Disable Form Items

  • Thread starter Thread starter Kevin S.
  • Start date Start date
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
 
Use the Form_Current Event with a statenmemt like:

Me.MyCommand.Enabled = Me.MyCheck

assuming MyCheck returning True or False.
 
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
 
Back
Top