Picture Based On Criterior

S

Scientific

Hello all,

I would like to link to a picture and have it appear on a form based on
criterior. For example, if current record is an employee then have an
employee badge appear. If the record is a contractor, then have a contractor
badge appear.

Is this possible to code in Access 2003?

-S
 
A

Arvin Meyer MVP

Assuming that there is an indicator field for employees and contractors, one
would change the image control in the form's Current event. Something like
this (aircode):

Sub Form_Current()
Select Case Criteria
Case Is "Employee"
Me.ImageCtl.Picture = "C:\FolderName\EmployeeBadge.jpg"
Case Is "Contractor"
Me.ImageCtl.Picture = "C:\FolderName\ContractorBadge.jpg"
Case Else
Me.ImageCtl.Picture = "C:\FolderName\NoBadge.jpg"
End Select
End Sub

where ImageCtl is the name of the Image Control.
 

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