Picture Based On Criterior

  • Thread starter Thread starter Scientific
  • Start date Start date
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
 
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.
 
Back
Top