KingRudeDog
Registered User.
- Local time
- Today, 16:01
- Joined
- May 12, 2006
- Messages
- 36
So I almost have this working.
I have a subform <body_style_data> linked to a parent form <test_request>.
I added code to the before_instert function on the subform to give each submitted sample to <body_style_data> an id number <sampleId> starting with 1.
Here is the code...
Me!sampleId = Nz(DMax("[SampleId]", "[body_style_data]"), 0) + 1
and it works great.
But I want it to reset to 1 when the parent form moves to a new record (adding new samples under a new record)
Next line of code please!!!!
So close!
I have a subform <body_style_data> linked to a parent form <test_request>.
I added code to the before_instert function on the subform to give each submitted sample to <body_style_data> an id number <sampleId> starting with 1.
Here is the code...
Me!sampleId = Nz(DMax("[SampleId]", "[body_style_data]"), 0) + 1
and it works great.
But I want it to reset to 1 when the parent form moves to a new record (adding new samples under a new record)
Next line of code please!!!!
So close!
Last edited: