enableing a command button

  • Thread starter Richard Farrell
  • Start date
R

Richard Farrell

I Have a data base of several hunderd contractors. Each
contractor hase many employees. I have a great system for
searching and finding who or what I want this works great.
However I have one contractor with unusal account
information. I have this information on a seperate
form /table and the form can be opened by using command
button.I only want this button (either visible or enabled)
when I am viewing the specific vendor.Right now the
command button ("click here for adittional account
information") is visible while viewing all contractors on
my data base. And when you click it opens a unusable form
for that contractor.

Thank You in advance
Richard Farrell

(e-mail address removed) or (e-mail address removed)
 
W

Wayne Morgan

In the Current event of the form, check the value of the control or field
that will identify that contractor and enable/disable the button
accordingly.

Example:
Me.cmdMyButton.Enabled = (Me.txtMyTextbox = "My Contractor")

The part inside the parenthesis will return True or False, enabling or
disabling the button.
 

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