enabliling a command button

  • Thread starter Thread starter Richard Farrell
  • Start date 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)
 
Assuming you have a textbox with the name of the contractor on the form then
you could do something like this on the Current Event of your form.

If Me.txtContractor = "YourContractorName" Then
Me.cmdExtraForm.Enabled = False
Else
Me.cmdExtraForm.Enabled = True
End If
 
Back
Top