validation check before updating new record

Local time
Today, 07:53
Joined
Aug 3, 2005
Messages
66
Access2000

Hello

The mainform is based on a query and also has a autonumber(prim key) field as well as several other fields.

Several sub-forms on the mainform links to the mainform's autonumber field in a one-to-many relationship.

When the user opens the mainform (with recordsgotonew), the subforms are visible and data can be added/updated.

I want to force the user to complete at least one field on the mainform BEFORE working in the subforms.

I know I can do this with an IF statement on the fields in the subforms, but there are many subforms, each with many fields.

I think I'm looking for a "universal" way of checking that the mainform-record has been updated BEFORE any field in the subform are allowed to be updated.

Any help is appreciated.

Thank you kindly.
Jamie.
 
Personally I'd enforce it via VBA by hiding / disabling forms I don't want people to use yet.

Decide which field(s) you want to be mandatory and have the OnOpen event for the mainform hide the subforms if those fields are null & set the afterupdate events for each of the mandatory fields to perform the same check again and unhide the subforms if all mandatory fields are populated.
 

Users who are viewing this thread

Back
Top Bottom