Disable a button after event

Muzicmn

Registered User.
Local time
Today, 08:01
Joined
Nov 3, 2002
Messages
78
hey guys,

does anyone have any idea on how to disable a button after the event has been run? I want to give the user a few options on a form. When one is depressed i would like that option not to be available any more.

I tried forms![frmmbiinfo]![command10].enabled = false

but i guess i need to refreash the page somehow. All i keep getting is an error saying "Object doesnt support this proerty or method"

thanks in advance

Ricky
 
Nevermind, figured it out. I had to set the focus somewhere else in order for the statement to work

thanks anyway

Ricky
 
The command is OK. Are you running this from the form which it is on or another form? from the same form you could try
me.[command10].enabled = false but it should make no difference
You need to make sure that the button does not have the focus when you run the code but that should give another error.

Peter
 
Have a look at the attached sample, should give you some basic ideas.

I have used a command button called "cmdDud" to take the focus from the command button after it has been clicked. This is to prevent:

You need to make sure that the button does not have the focus when you run the code but that should give another error.

Good Luck
 
Last edited:
thanks alot, the example helped tremendously

i believe i had a space in the original formula and that caused the error. When i eliminated the space i was left with the focus issue and your example was right on the money

thanks again

Ricky
 

Users who are viewing this thread

Back
Top Bottom