Transparent command button

G

Guest

I want to make my command button (that pulls up a form) to be visible or not
visible depending on whether a text box is null or not.

my text box says "=IIf([Forms]![Name of Form]![arrow]=Yes,"Post
note",IIf([Forms]![name of form]![Orig Amount]<[Forms]![name of
form]![modified amount],"Post note A"))"



Any suggestions would be great, thank you
 
G

Guest

In design mode set the Visibility property of the command button to No.
In the After Update event of the text box you want to check for Null:

Me.MyCommandButton.Visible = Not IsNull(Me.MyTextBox)

This will make the command button visible if there is any value in the text
box and invisible if no value is in the text box.

You will also need to put this line in the form's Current event so it resets
the button to invisible when you move to a different or new record:

Me.MyCommandButton.Visible = False
 
G

Guest

I must be doing something incorrectly

I have "Me.EDI_Claim_Documentation.Visible = Not IsNull(Me.Text916)" in the
after update but the command button is not visible.

as advised, I have this in the On Current

Private Sub Form_Current()
Me.EDI_Claim_Documentation.Visible = False
End Sub

Can you identify what I may have missed



Klatuu said:
In design mode set the Visibility property of the command button to No.
In the After Update event of the text box you want to check for Null:

Me.MyCommandButton.Visible = Not IsNull(Me.MyTextBox)

This will make the command button visible if there is any value in the text
box and invisible if no value is in the text box.

You will also need to put this line in the form's Current event so it resets
the button to invisible when you move to a different or new record:

Me.MyCommandButton.Visible = False

dchristo said:
I want to make my command button (that pulls up a form) to be visible or not
visible depending on whether a text box is null or not.

my text box says "=IIf([Forms]![Name of Form]![arrow]=Yes,"Post
note",IIf([Forms]![name of form]![Orig Amount]<[Forms]![name of
form]![modified amount],"Post note A"))"



Any suggestions would be great, thank you
 

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