Disable a command button in Add mode

  • Thread starter Thread starter injanib via AccessMonster.com
  • Start date 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?
 
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
 
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
 
Back
Top