SetFocus for subforms and validated fields

junebug468

New member
Local time
Today, 12:46
Joined
Dec 9, 2009
Messages
3
I have a main form (SMILI_entry) which has a subform (HH_data) at the bottom of the first page (Section 1) in a tabbed form with four pages. Ideally, all fields will be required before adding another record in the main form. However, when I set all fields to required and tab through the entry form, I cannot enter data into the subform until it has moved all the way through the four pages of the main form!

I thought I could use the setfocus command, but I cannot get it to work - I just get an error that I need to fill out the next field on the main form. As a VB novice, I am becoming very frustrated. Any suggestions??!

Jenny
 
When you move from a main form to a subform, Access attempts to save the record on the main form. If you have required fields set or validation for fields in place, you're going to get the messages. In point of fact, you should not be entering a child record (on the subform) until you have a complete parent record.

To work around this you're going to have to enter your subform data after completing your main form record, or you're going to have to use unbound forms and fill out everything and then commit it to the table, it that is way more trouble than it's worth!
 
So there is no way around it. I set it up like this to follow the format of the questionnaire (household data for each participant is part of the first section).
 

Users who are viewing this thread

Back
Top Bottom