Disable Form Items

K

Kevin S.

Hello. I am trying to disable certain items on a continous form, however,
the items should only be disabled on certain records. Example...

---- record 1
mycheck = true
mycommand (is enabled)

---- record 2
mycheck = false
mycommand (is disabled)

How can I make Access check to see if a value is true or false on each
record and disable or enable items on different records as needed?

Thanks in advance.
-Kevin
 
V

Van T. Dinh

Use the Form_Current Event with a statenmemt like:

Me.MyCommand.Enabled = Me.MyCheck

assuming MyCheck returning True or False.
 
K

Ken Snell

Use the OnCurrent event of the subform's form and run code similar to this:

Private Sub Form_Current()
Me.MyCommand.Enabled = Me.MyCheck.Value
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top