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
 

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

Back
Top