C
charles.kendricks
I have a client database from which I am trying to print picture ID
badges. My approach was to create a small report that displays
client
name, SSN, and picture as well as some other information. The
pictures are stored in a folder on disk C:\photos and are named with
the client SSN. I want to be able to get more than just one card per
sheet of paper, so the report size is only about 2" in height and
41/2" wide. I'm thinking that I should see the detail section
repeated vertically on the page with a different card in each section
of the final printed page. My problem is that while the name and SSN
change for each card the picture stays the same, which is the picture
of the first person. The code I'm using in the On Activate action
that follows:
Private Sub Report_Activate()
Dim strFile As String
Dim strDefFile As String
Dim strFullPath As String
Dim strDefFullPath As String
' Be sure to amend photo path and image control
strFullPath = strPhotodir + Me!SSN + ".bmp"
strDefFullPath = strPhotodir + "Bitmaps\Med5.gif"
strFile = Dir(strFullPath, vbNormal)
strDefFile = Dir(strDefFullPath, vbNormal)
If (strFile <> vbNullString) Then
Image15.Picture = strFullPath
Else
Image15.Picture = "strDefFullPath"
End If
End Sub
badges. My approach was to create a small report that displays
client
name, SSN, and picture as well as some other information. The
pictures are stored in a folder on disk C:\photos and are named with
the client SSN. I want to be able to get more than just one card per
sheet of paper, so the report size is only about 2" in height and
41/2" wide. I'm thinking that I should see the detail section
repeated vertically on the page with a different card in each section
of the final printed page. My problem is that while the name and SSN
change for each card the picture stays the same, which is the picture
of the first person. The code I'm using in the On Activate action
that follows:
Private Sub Report_Activate()
Dim strFile As String
Dim strDefFile As String
Dim strFullPath As String
Dim strDefFullPath As String
' Be sure to amend photo path and image control
strFullPath = strPhotodir + Me!SSN + ".bmp"
strDefFullPath = strPhotodir + "Bitmaps\Med5.gif"
strFile = Dir(strFullPath, vbNormal)
strDefFile = Dir(strDefFullPath, vbNormal)
If (strFile <> vbNullString) Then
Image15.Picture = strFullPath
Else
Image15.Picture = "strDefFullPath"
End If
End Sub