By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,940 Members | 611 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,940 IT Pros & Developers. It's quick & easy.

Disable a Command Button

P: n/a
Within the form “frmIncidentForm” I have a textbox and a command button.

I would like to disable the “AddIncident” button when the “IncidentID”
textbox is NOT empty. If possible I would like the code in the Forms Event
“On Current”.

Thanks

--
Message posted via http://www.accessmonster.com

Jan 10 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
pushrodengine via AccessMonster.com wrote:
Within the form “frmIncidentForm” I have a textbox and a command button.

I would like to disable the “AddIncident” button when the “IncidentID”
textbox is NOT empty. If possible I would like the code in the Forms Event
“On Current”.

Thanks
In the OnCurrent event enter
Me.AddIncident.Enabled = (IsNull(Me.IncidentID))

Nymphs
http://www.youtube.com/watch?v=gg7WG6tCbrw

Jan 10 '08 #2

P: n/a
"Salad" <oi*@vinegar.comwrote in message
news:13*************@corp.supernews.com...
pushrodengine via AccessMonster.com wrote:
>Within the form "frmIncidentForm" I have a textbox and a command button.
I would like to disable the "AddIncident" button when the "IncidentID"
textbox is NOT empty. If possible I would like the code in the Forms
Event
"On Current".

Thanks

In the OnCurrent event enter
Me.AddIncident.Enabled = (IsNull(Me.IncidentID))
You might also consider adding some code in the AddIncident_AfterUpdate
event to disable the button when somebody puts data into the AddIncident
textbox.
Fred Zuckerman
Jan 10 '08 #3

P: n/a
Thank you for your help!

--
Message posted via http://www.accessmonster.com

Jan 11 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.