Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

image box choose from options at query stage

Status
Not open for further replies.

tizwaz

Technical User
Aug 8, 2002
437
GB
I need to make a report and on the report a different logo should appear depending on a choice made in a query. The choice is based on info not currently held in the database. Is it possible to type your choice in a paramater box at query stage eg type sales and sales logo appears on report?
If so how would I go about it?
 
You can add a text box to the detail section of the report:
Name: txtImage
Control Source: =[Enter Image]
Then in the On Format event of the section containing the control:
Code:
Dim strFileName as String
Select Case Me.txtImage
   Case "Sales"
      strFileName = "C:\Images\Sales.jpg"
   Case "HR"
      strFileName = "C:\Images\HumanResources.jpg"
End Select
Me.imgControl.Picture = strFileName

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top