Disable a Command Button
am 10.01.2008 16:45:27 von u36225
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
Re: Disable a Command Button
am 10.01.2008 17:17:05 von Salad
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
Re: Disable a Command Button
am 10.01.2008 18:16:31 von Fred Zuckerman
"Salad" wrote in message
news:13och82qjr7h195@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