Disable a command button in Add mode

  • Thread starter injanib via AccessMonster.com
  • Start date
I

injanib via AccessMonster.com

How can I set the enabled property of a command button to false if the form
is opened in add mode?
 
K

Ken Snell \(MVP\)

Test the DataEntry property in the form's Load event procedure. If it's
True, then the form is being opened in Add mode:

Private Sub Form_Load()
Me.CommandButton.Enabled = Not Me.DataEntry
End Sub
 
I

injanib via AccessMonster.com

thanks!
Test the DataEntry property in the form's Load event procedure. If it's
True, then the form is being opened in Add mode:

Private Sub Form_Load()
Me.CommandButton.Enabled = Not Me.DataEntry
End Sub
 
Top