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
 

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