Shaft960
asked on
How to disable a field in a form when you enter a subform
I want to disable the field called [Firstname] in a form called Mastercamp when I enter a subform called Campdate.
I keep getting error messages.
I keep getting error messages.
ASKER
On the subforms got focus I have this
Private Sub Form_GotFocus()
Forms![mastercamp].[Firstn ame].Enabl ed = False
End Sub
I was getting an error... now nothing happens
Private Sub Form_GotFocus()
Forms![mastercamp].[Firstn
End Sub
I was getting an error... now nothing happens
are you sure the name of the textbox is "Firstname" not something else? txtFirstname?
can you upload a copy of your db
ASKER
I'm confused,
If you are in the subform, you cant edit the main form anyway.
If you disable the control when you enter the subform, do yo ever want to enable it?
Can you explain the need for doing this?
If you are in the subform, you cant edit the main form anyway.
If you disable the control when you enter the subform, do yo ever want to enable it?
Can you explain the need for doing this?
ASKER
I want the field Firstname to be disabled once it is filled... I have coding in the subform that prevents going into the subform until Firstname and Lastname are filled..
Suppose they mis-pell one of them?
;-)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
try using the focus event of the subform or the got focus of a control in the subform
post the code you are using.