Locking subform out based on dropdown choice

vangogh228

Registered User.
Local time
Today, 03:53
Joined
Apr 19, 2002
Messages
302
I have a dropdown with two choices. Each choice requires, then, a different set of inputs. Can I put two subforms on my main form and have it so that only one of them will allow entry/editing, based on the result of a drop down (or radio button) choice?

Thanks for any help!

Tom
 
Yes. In the After Update event of the Combo Box you can use code something like this:

Select Case ComboBoxName
Case 1
Me.SubformName.Locked = False
Me.OtherSubformName.Locked = True
Case2
Me.OtherSubformName.Locked = False
Me.SubformName.Locked = True
End Select

Lock both subforms Locked properties to Yes so they are locked until a choice is made in the Combo Box. In the code above I assume that the combo box bound field is either a 1 or a 2.

hth,
Jack
 
Jack:

THANKS so much. That seems simple enough, and I will certainly try that out.

Tom
 

Users who are viewing this thread

Back
Top Bottom