Making a control Visible

  • Thread starter open a adobe file from a command button
  • Start date
O

open a adobe file from a command button

I have a 'cmdPrint' button that looks at a field when a form loads. If the
field has data in it the 'cmdPrint button is not visible. It works, so I
wanted to take it one step further. I have a parameter query that asks for a
auto number. You enter the record you want, the form populates with the
person's name, address, stuff like that, but if you enter a auto number that
is not there the form comes back with blanks, so if the name comes back blank
I want to make the 'cmdPrint' button enabled = false just like when the form
loads. I went to the form view, clicked on the 'name' field, clicked on
'after update' and put in my code, I don't get any errors but the code does
not work. What am I doing wrong???

If IsNull(Me!test) Then
Me!cmdPrint.Enabled = True
Else
Me!cmdPrint.Enabled = False
End If
 
S

Shaun Beane

Try putting your code in the on current event for the FORM.

Shaun Beane

"open a adobe file from a command button"
 
O

open a adobe file from a command button

That worked! Thanks

Shaun Beane said:
Try putting your code in the on current event for the FORM.

Shaun Beane

"open a adobe file from a command button"
 
Top