If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Required data on subforms
Hi group,
I have an Access parent form with two subforms. I'm wondering whether there's a way to "force" people to enter data on one field in each subform, or else not save any data (parent data included) at all. If it's relevant, the parent form is supplied by a query. Each subform is supplied by its own table. Each table is linked to the parent query by a unique primary key. I'm able to detect incomplete subform data using the BeforeUpdate event on the parent form. But I'm not sure what to do from there. I'd be very grateful for any help! Thanks, Rob |
#2
|
|||
|
|||
Required data on subforms
Due to how Access handles data, what's been keyed in the parent form will
be saved before the user starts to key anything on the subform. The only way to achieve what you're trying to do would be to have logic that deletes the row from the parent table if nothing's added on either subform. If this is a single-user application, you could achieve this by writing a Delete query that deletes any rows in the parent table that have no children, and run that query when you exit the parent form (or even on the Current event of the parent form). -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Rob M" wrote in message ... Hi group, I have an Access parent form with two subforms. I'm wondering whether there's a way to "force" people to enter data on one field in each subform, or else not save any data (parent data included) at all. If it's relevant, the parent form is supplied by a query. Each subform is supplied by its own table. Each table is linked to the parent query by a unique primary key. I'm able to detect incomplete subform data using the BeforeUpdate event on the parent form. But I'm not sure what to do from there. I'd be very grateful for any help! Thanks, Rob |
#3
|
|||
|
|||
Required data on subforms
Thanks Doug. That explains a lot. I think it's back to the drawing
board with this idea... Cheers, Rob |
Thread Tools | |
Display Modes | |
|
|