Hidden command button & code to make it visible

L

larochy

Hi.....I have a hidden command button and when I choose the value "UNCR-E3"
from a combo box, I want the command button to be visible. Here's the code
I'm currently using and it's not working, any suggestions?

Private Sub SKU_AfterUpdate()
If Me.SKU.Value = "UNCR-E3" Then
Me.Command58.Visible = True
Else
Me.Command58.Visible = False
End If
End Sub
 
J

Jeanette Cunningham

Hi larochy,

debug the code like this:

Private Sub SKU_AfterUpdate()
Debug.Print "sku: " & Me.SKU
Debug.Print Me.Command58.Visible
If Me.SKU.Value = "UNCR-E3" Then
Me.Command58.Visible = True
Else
Me.Command58.Visible = False
End If
End Sub

Maybe there is a typo in the names of the controls or the vaule uncr-e3


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 

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