I
Isaac Sanchez
I have a form that shows an image using the following code:
Private Sub FORM_CURRENT()
On Error GoTo Err_Handler
If Len(CStr(Nz(Me.Text42, "")) & CStr(Nz(Me.DISPLAYER, ""))) > 0 Then
Me.Image46.Picture = "K:\DB\Maps\" & CStr(Me.DISPLAYER) & ".BMP"
Else
Me.Image46.Picture = ""
End If
Exit_Handler:
Exit Sub
Err_Handler:
If Err.Number <> 2501 Then
Me.Image46.Picture = "K:\DB\Maps\1 NO MAP.BMP"
End If
Resume Exit_Handler
End Sub
I need the ability to override the image with the use of a text box and/or
if needed a check box. I tried to figure it out but I've been unsuccessful.
Not sure how to properly tweak the code
To be honest I don't even know why
"If Len(CStr(Nz(Me.Text42, "")) & CStr(Nz(Me.DISPLAYER, ""))) > 0 Then"
is required for the thing to work. I tried to take it out cause there is
always
a name in the "DISPLAYER" field but it will not work with out it.
So how would I incorporate my over ride into the code.
All help will be greatly appreciated.
Isaac Sanchez
Private Sub FORM_CURRENT()
On Error GoTo Err_Handler
If Len(CStr(Nz(Me.Text42, "")) & CStr(Nz(Me.DISPLAYER, ""))) > 0 Then
Me.Image46.Picture = "K:\DB\Maps\" & CStr(Me.DISPLAYER) & ".BMP"
Else
Me.Image46.Picture = ""
End If
Exit_Handler:
Exit Sub
Err_Handler:
If Err.Number <> 2501 Then
Me.Image46.Picture = "K:\DB\Maps\1 NO MAP.BMP"
End If
Resume Exit_Handler
End Sub
I need the ability to override the image with the use of a text box and/or
if needed a check box. I tried to figure it out but I've been unsuccessful.
Not sure how to properly tweak the code
To be honest I don't even know why
"If Len(CStr(Nz(Me.Text42, "")) & CStr(Nz(Me.DISPLAYER, ""))) > 0 Then"
is required for the thing to work. I tried to take it out cause there is
always
a name in the "DISPLAYER" field but it will not work with out it.
So how would I incorporate my over ride into the code.
All help will be greatly appreciated.
Isaac Sanchez