Locked fields

T

Ticotion

Hi

I have a form where I have two subforms on it. When the user starts he has
to make 4 selections before the rest of the fields is open for input.
I know that on the main form I can use the me.text42.locked = true or false,
but how do I lock the subforms?
Please notice that the following also should be possible. On Subform 1 The
first field should be unlocked when using the generel unlock procedure. When
the user input data in the first field in subform2 the next field should be
unlocked. How is this possible?

Thank you for all your help.

Br
Ticotion
 
J

Jeanette Cunningham

You can use the BeforeInsert event of the suubform.

In that event put code something like this (untested air code)-->
If IsNull(Me.Parent.[ControlNameA]) Or _
IsNull(Me.Parent.[ControlNameB]) Then
Cancel = True
Msgbox "Fill in field a and field b first"
end if


Replace [ControlNameA] and [ControlNameB] with your control names on your
form.



Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 

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

Top