02-06-11, 12:25 #1Registered User
- Join Date
- Jun 2010
Unanswered: Force new records in 2 subforms when mainform is activated
I understand that writing a value to a control in my subforms will open them somehow when my mainform is activated.
I'm not that advanced so not sure how to write a value. I can use After Update event of the ID control in the main form. I would like the values I write to be the autonumber in ID fields of the 2 subfroms, or the date fields to todays date - but I'm not sure of the syntax.
Can anyone provide a code example for this After Update?
02-06-11, 13:09 #2Moderator
Provided Answers: 19
- Join Date
- Jun 2005
- Richmond, Virginia USA
If you have the main form/subforms set up properly, using the Child and Master Fields properties, Access will do this automatically.
But the fields on your subforms that relate to the main form's ID field cannot be Autonumbers! The ID on the main form can be an AutoNumber but the foreign keys, which is what the IDs on the subforms would be, in this type of relationship, have to be defined as Numbers - Long Integer.
Linq ;0)>Hope this helps!
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007