I'm trying to figure out what I am doing wrong
I have in vba
if StatusID = 5 then
me.CloseButton = false
end if
The statusID is on the subform
I tried me.parent.closebutton
I also tried me.form.closebutton
I get errors...
what have I missed?
I'm trying to figure out what I am doing wrong
I have in vba
if StatusID = 5 then
me.CloseButton = false
end if
The statusID is on the subform
I tried me.parent.closebutton
I also tried me.form.closebutton
I get errors...
what have I missed?
I have tried this too
Forms!frmBookingEdit.CloseButton = False
I always get this error - Runtime Error '2136'
It seems it is not possible to set the property anywhere other than the form's design view. I tried too, didn't work in VBA on the form's load event. 2003 or 2010
Never tried that one before, now I know. The help files state that it can only be done in design view, just below where it describes it can be done using the form's properties, macros, or VBA
A button does not have value property so you cannot set a button to "FALSE".me.CloseButton = false
What exactly are you trying to do?
Are you trying to disable the button? Then you would use "me.CloseButton.Enabled = false"
Are you trying to hide the button? Then you would use "me.CloseButton.Visible = false"
I read that too, I'm kind of surprised. I will have to set the form close button to no, create a button that closes the form and hide that on the ifIt seems it is not possible to set the property anywhere other than the form's design view. I tried too, didn't work in VBA on the form's load event. 2003 or 2010
Never tried that one before, now I know. The help files state that it can only be done in design view, just below where it describes it can be done using the form's properties, macros, or VBA
Thank you kindly for your response itsme
That is the way I have always done it. Having your own close button is nice because then you can execute code to verify everything is good to go before the user bails out.