S
SUZYQ
In Access 2002, I have a main form that is bound to a table. On that
form there also two other subforms that are bound to tables.
If the user enters a certain document type on the main form, I want to
ensure that there are entries in one of the subforms before the user
can move to another record or create a new one.
What event should I put this code on? I've been trying to do it on the
Before Update event of the main form, which seems to work pretty well.
Is this the best choice? If I put in code Cancel = True then I'm not
able to get into the subform to actually enter the missing data. If I
don't put it in, then I think the record is being committed to the
table which isn't a problem as long as the user then enters the missing
data in the subform.
Also, when the user gets a message box I want to tell them that they
have to enter information in the subform. I then try to set the focus
to a field on the subform, but it's not working. My syntax is
Me.SubformName!FieldName.setfocus.
Any ideas are appreciated.
form there also two other subforms that are bound to tables.
If the user enters a certain document type on the main form, I want to
ensure that there are entries in one of the subforms before the user
can move to another record or create a new one.
What event should I put this code on? I've been trying to do it on the
Before Update event of the main form, which seems to work pretty well.
Is this the best choice? If I put in code Cancel = True then I'm not
able to get into the subform to actually enter the missing data. If I
don't put it in, then I think the record is being committed to the
table which isn't a problem as long as the user then enters the missing
data in the subform.
Also, when the user gets a message box I want to tell them that they
have to enter information in the subform. I then try to set the focus
to a field on the subform, but it's not working. My syntax is
Me.SubformName!FieldName.setfocus.
Any ideas are appreciated.