Using the Visible Property with Controls on a Report

G

Guest

I have included a number of simple graphics on our work tickets. The graphic
varies by the product (ItemID) being produced. I am trying to use the visible
property to hide or show the appropriate graphic based on the item selected
from the ItemID drop down box.

So far I have the following, but it is not working:

Private Sub Report_Open(Cancel As Integer)

If Reports!WorkTicket!ItemID.Value = "pillow" Then
Reports!WorkTicket!PillowFig.Visible = True
Else: Reports!WorkTicket!PillowFig.Visible = False
End If
End Sub


Any help is greatly appreciated.
 
G

Guest

Lele,

If ItemID is a combo box, what is displayed might not be the same as its
*value*, which is determined by the Bound Column. If the BoundColumn is 1,
then the combo box' value is the first field in the fieldlist of the
RowSource statement. Usually this is an integer foreign key. By setting the
first ColumnWidth to 0", the second field, normally a more meaningful text
field is displayed.

Hope that helps.

Sprinks
 
G

Guest

Hi,
Thanks for the suggestion. I am somewhat familar with what you are saying.
Although I probably will eventually set this up as a drop down, at this time
it is just a text box. I want to get the code right first.

Any ideas on why it does not work?

Thanks so much.
 

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