Disable Button

romio

Registered User.
Local time
Yesterday, 16:03
Joined
Apr 20, 2005
Messages
68
I am not sure but this how it should work in VB, I am trying to disable a button that exists on a different form:

ACAudio!Command89.Enabled = False

Where ACAudio is the name of the form and Command89 is the name of the button but I keep getting an error saying object required.
 
Try...

Forms!ACAudio!Command89.Enabled = False
 
Error:

Run-Time Error 2450

Microsoft office access cant find the form ACAudio referred to in a macro expression or visual basic code
 
romio said:
Error:

Run-Time Error 2450

Microsoft office access cant find the form ACAudio referred to in a macro expression or visual basic code
The ACAudio form must be opened when you run the code.

Is the form "ACAudio" spelled correctly?

Also, a proper naming convention would look like... frmACAudio.

The code should look like this [I had an extra ! instead of a .]
Code:
Forms![ACAudio].Command89.Enabled = False
 
Last edited:

Users who are viewing this thread

Back
Top Bottom