Make inactive

  • Thread starter Thread starter JenK
  • Start date Start date
J

JenK

I would like to make a combo box and text box inactive after the user has
moved into the subform. How can I do this. I use both macros and expressions
so I am wide open to learning the best way to go about this.
 
I tried the "On Lost Focus" of the main form, and the "On Got Focus" event of
the subform, but these didnt work. I was able to add the code below to the
"On Got Focus" event of one of the controls on the subform and it did disable
the textbox. Im not sure how your users can move to the subform, but if they
can acess every control you would have to add this code to every control.

Forms![YourMainFormName]![TheFieldToDisable].Enabled = False
 
Thank-you for the answer, I am unsure though as to what field name I out in
exchange for MyTextBoxName (Me.MyTextBoxName.Enabled = False). I put
ProjectID in the MyComboBoxName.
 
You would put the name of the textbox you want to disable. In your original
post you said you had a combo box and a textbox you want to disable. If your
unsure what the name is of the textbox just right click it, go to properties,
then the all tab, and the name of the textbox will be listed there.
 
Back
Top