If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Icons to substitute for text
I have a db that makes reference to restaurants, hotels, retail shops, etc.
and I want to produce a one page report that shows these items using icons instead of text for a certain area. Can I do this in Access or do I need to export to Word? Thanks. |
#2
|
|||
|
|||
Icons to substitute for text
On Wed, 21 Feb 2007 09:19:00 -0800, dapetrella wrote:
I have a db that makes reference to restaurants, hotels, retail shops, etc. and I want to produce a one page report that shows these items using icons instead of text for a certain area. Can I do this in Access or do I need to export to Word? Thanks. If you know the location of the picture bitmap, you should be able to use some code to select the correct picture. Add an Image control to the report Detail section. Code the Detail Format event: If [Category] = "Restaurant" Then Me.ImageControlName = "C:\ImageFolder\RestaurantPicture.bmp" ElseIf [Category] = "Hotel" Then Me.ImageControlName = "C:\ImageFolder\HotelPicture.bmp" ElseIf .... etc. End If -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
#3
|
|||
|
|||
Icons to substitute for text
Thanks for the quick reply. I use Yes/No checkboxes instead of text for
these items...How would the code read for this type of substitution? "fredg" wrote: On Wed, 21 Feb 2007 09:19:00 -0800, dapetrella wrote: I have a db that makes reference to restaurants, hotels, retail shops, etc. and I want to produce a one page report that shows these items using icons instead of text for a certain area. Can I do this in Access or do I need to export to Word? Thanks. If you know the location of the picture bitmap, you should be able to use some code to select the correct picture. Add an Image control to the report Detail section. Code the Detail Format event: If [Category] = "Restaurant" Then Me.ImageControlName = "C:\ImageFolder\RestaurantPicture.bmp" ElseIf [Category] = "Hotel" Then Me.ImageControlName = "C:\ImageFolder\HotelPicture.bmp" ElseIf .... etc. End If -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
#4
|
|||
|
|||
Icons to substitute for text
On Wed, 21 Feb 2007 10:00:28 -0800, dapetrella wrote:
Thanks for the quick reply. I use Yes/No checkboxes instead of text for these items...How would the code read for this type of substitution? "fredg" wrote: On Wed, 21 Feb 2007 09:19:00 -0800, dapetrella wrote: I have a db that makes reference to restaurants, hotels, retail shops, etc. and I want to produce a one page report that shows these items using icons instead of text for a certain area. Can I do this in Access or do I need to export to Word? Thanks. If you know the location of the picture bitmap, you should be able to use some code to select the correct picture. Add an Image control to the report Detail section. Code the Detail Format event: If [Category] = "Restaurant" Then Me.ImageControlName = "C:\ImageFolder\RestaurantPicture.bmp" ElseIf [Category] = "Hotel" Then Me.ImageControlName = "C:\ImageFolder\HotelPicture.bmp" ElseIf .... etc. End If -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail I'm glad you posted back. I see I left off the property of the Image control that you had to change. It should have read: Me.ImageControlName.Picture = "C:\ImageFolder\RestaurantPicture.bmp" etc. I've fixed it below. Check boxes? Hopefully you mean Check boxes used within an Option Group. If you do have individual check boxes bound to separate fields in the table .... If [CheckRestaurant] = True Then Me.ImageControlName.Picture = "C:\ImageFolder\RestaurantPicture.bmp" ElseIf [CheckHotel] = True Then Me.ImageControlName.Picture = "C:\ImageFolder\HotelPicture.bmp" ElseIf .... etc. End If That's not a good design as it's possible to have more than one check box checked. If the check box is within an option group (Better design. Only one can be checked.): If Me.[OptionGroupName] = 1 then Me.ImageControlName.Picture = "C:\ImageFolder\RestaurantPicture.bmp" ElseIf Me.[OptionGroupName] = 2 Then Me.ImageControlName.Picture = "C:\ImageFolder\HotelPicture.bmp" ElseIf .... etc. End If I'm assuming you only have a half dozen or so items. If you have many, look up Select Case in VBA help. It's a bit easier to follow if you have lot's of options. -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
Thread Tools | |
Display Modes | |
|
|