Validate Parent Form before allowing subform to index

WatsonDyar

Registered User.
Local time
Today, 07:32
Joined
Aug 12, 2014
Messages
50
I'm sure this ain't a tough one....but I'm lost.

I have a form with subforms. I don't want the subforms to index a new record until the parent for is validated.

Thank you in advance!
 
not quite sure what you are asking but the answer might be

ensure you have set referential integrity in relationships between the two tables

or it might be

if the parent record already exists but has not been validated by a user, presumably you have a validated Boolean flag for the parent record

it this is the case in the main form current event out something like

me.subformnamehere.form.allowadditions=me.validated
 
Like CJ, not all sure what you mean by 'index a new record;" it has no meaning in Access. If you mean create a new record, while you might see what appears to be a record, in the Subform, it isn't such until you start to enter data in it, and you can't do this until a new record in the main form is saved. Validation of the Main Form needs to be done before it is saved, in its Form_BeforeUpdate event.

A clearer explanation of your needs would probably help us to help you better.

Linq ;0)>
 
CJ_London/linq-

I apologize for the delayed response. Thank you both for the assistance. What I meant was preventing a user to enter data into a subform until data from the parent form was validated.
 
As one of my suggestions:

in your main table have a validation yes/no field and in the current event of the main form something like

mysubformnamehere.enabled =validationfield
 

Users who are viewing this thread

Back
Top Bottom