Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Validation with SubForm

Status
Not open for further replies.

hende10

MIS
Aug 22, 2002
93
US
I have a main form with a subform built in. On the main form, I have two fields that need to be validated. However, the tab order I need to have starts on the main form for 4 fields, then goes into the subform for 'x' fields/records, then back to the main form for the final 4 fields.

The two fields that need validated are located below the subform in the form, and after the subform in the tab order. The problem is when the user enters the first 4 fields of data, then automatically tabs into the subform, the validation checks run and bring up an invalid input error. I've tried BeforeUpdate, AfterUpdate, AfterInsert, OnDirty, and FormUnload, but all of them are triggered when the main form loses focus.

Is there anyway to do the validation while still keeping the subform in the middle of the form (in tab order)? Is there a way to get the validation to run when the form moves to the next new record?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top