I have a table that holds text links to pictures. ´The pictures are showed in a Form with the following code
where txtPicture is a textbox with part of the link and Picture is a picture element on the report.
'*****************************************************
Private Sub Form_Current()
On Error GoTo err_Form_Current
If Not Me!txtPicture = "" Or Not IsNull(Me!txtPicture) Then
Me!Picture.Picture = "c:/Picture/" + Me!txtPicture + ".bmp"
Else
Me!Picture.Picture = ""
End If
exit_Form_Current:
Exit Sub
err_Form_Current:
MsgBox Err.Description
Resume exit_Form_Current
End Sub
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_Form_Open
If IsNull(Me!txtPicture) Or Me!txtPicture = "" Then
' do nothing
Else
Me!Picture.Picture = "c:/Picture/" + Me!txtPicture+ ".bmp"
End If
Exit_Form_Open:
Exit Sub
Err_Form_Open:
MsgBox Err.Description
Resume Exit_Form_Open
End Sub
'******************************************************
and I need to show the pictures in a Report. Can anyone help me with how the code should change and where it should be. i tried putting
Me!Picture.Picture = "c:/Picture/" + Me!txtPicture+ ".bmp"
in the Format of the detail section but the picture does not show.
where txtPicture is a textbox with part of the link and Picture is a picture element on the report.
'*****************************************************
Private Sub Form_Current()
On Error GoTo err_Form_Current
If Not Me!txtPicture = "" Or Not IsNull(Me!txtPicture) Then
Me!Picture.Picture = "c:/Picture/" + Me!txtPicture + ".bmp"
Else
Me!Picture.Picture = ""
End If
exit_Form_Current:
Exit Sub
err_Form_Current:
MsgBox Err.Description
Resume exit_Form_Current
End Sub
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_Form_Open
If IsNull(Me!txtPicture) Or Me!txtPicture = "" Then
' do nothing
Else
Me!Picture.Picture = "c:/Picture/" + Me!txtPicture+ ".bmp"
End If
Exit_Form_Open:
Exit Sub
Err_Form_Open:
MsgBox Err.Description
Resume Exit_Form_Open
End Sub
'******************************************************
and I need to show the pictures in a Report. Can anyone help me with how the code should change and where it should be. i tried putting
Me!Picture.Picture = "c:/Picture/" + Me!txtPicture+ ".bmp"
in the Format of the detail section but the picture does not show.