bound forms and subforms

S

SUZYQ

I have a form where users enter the unique information about a
document. This form contains only one record per document and is bound
to the parent table. For certain document types, users must enter
information in a subform. The subform (in datasheet view), bound to a
child table, can contain multiple records that relate back to the main
document.

I want to prevent users from being able to move off the current
"screen" using the navigation buttons, until validation is done to
ensure that all elements are completed as required on the main form
and, if necessary, on the subform.

I tried using the "before update" event of the main form to evaluate
completeness on the main form and the subform. Unforunately, I can't
move the focus to the subform if there is data missing. If I do it on
the "after update" event of the main form, there's nothing to ensure
that the subform data gets completed.

Is there a way that I can cleanly peform this task using bound forms?

Thanks,
 
J

Jason Malatia

Try using the "OnExit" Event property for the subForm.... This is a property
of the main form (the subform control has properties & events just like a
textbox or comboBox).

In Form design view, click on the border edge of the subform... Then look at
the property window. The properties for the subForm control will be
displayed.

Jason
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top