Open/New Record in sample database

Hdata

Registered User.
Local time
Today, 01:41
Joined
Sep 10, 2013
Messages
56
Hello (Access 2010)
My question relates to the sample database (Student Database) provided by Microsoft. Upon opening this database, a datasheet view of the student list appears and the first column includes an Open field which opens a detail form for input or a blank detail form for new student (very handy).
This field does not appear in the query identified as the Record Source? When I view this form in design view, a "txtOpen" text box directly below the ID field appears with a function =IIf(IsNull([ID]),"(New)","Open"). I'm looking an explanation of how this is was created.
Thanks.
 
The field ID has an Embedded Macro. If you go to Design View and then the field ID and look in the Properties window under the On_Click event you will see the Embedded Macro which you can then review.

Oops, forgot the WELCOME to the Forums! :D
 
Last edited:
Here's what you sent to me...

Thanks for your input, and I believe I have done what you are saying. However, I must have missed something because when I view the form in design view, I don't get the txtOpen field with the function or the Open/New field in blue color from the datasheet view.

So the Embedded Macro in the ID field is all it takes, and that creates the txtOpen textbox in the form design view? and also the open field (in blue text) on the datasheet view? Then I should try again.

You are not looking to txtOpen. You are looking for the field ID, it's the first field. It doesn't create that field (txtOpen) it simply displays it based on the value if the ID field.
 
Thanks for your Welcome and input on this issue, and I believe I have done what you are saying. However, I must have missed something because when I view the form in design view, I don't get the txtOpen field with the function or the Open/New field from datasheet view.

So the Embedded Macro in the ID field is all it takes, and that creates the txtOpen textbox in form design view? and also the open field (in blue text) on the datasheet view? Then I should try again.
 

Users who are viewing this thread

Back
Top Bottom