R
Rnorton
' stupid license registeration
frm!Imagn1.Object.UL 136463455, 1211342528, 1340341566, 10739
----------------------------
I currently use an access database for real estate data. I have a button
called "view" that when pressed is suposed to open a window with an image.
It actually opens a message box with "viewing error" then opens the window
with no image.
The button calls an event proceedure, or function named ViewPhoto2_Click.
(Pasted Below) This function calls another function titled
ViewCurrentPhoto() (also pasted below). This function errors at the line
beneath the explanation that says ('stupid liscence registration). I also
posted this line above. What is this command attempting to do and how can I
make it work?
-------------------------------------
Private Sub ViewPhoto2_Click()
On Error Resume Next
pfrm = "PhotoView"
TempData = Me!FileName
If FormIsOpen(pfrm) Then
' refresh the display
x = ViewCurrentPhoto()
Else
DoCmd.OpenForm pfrm
End If
End Sub
------------------------
Function ViewCurrentPhoto()
On Error GoTo ViewPhotoErr:
Dim frm As Form
Set frm = Forms!PhotoView
' load the file name & display image
Dim BufId As Long
Dim bm As String
fname = TempData
' stupid license registeration
frm!Imagn1.Object.UL 136463455, 1211342528, 1340341566, 10739
On Error GoTo 0
If IsSomething(fname) Then
frm!Imagn1.Object.FileName = fname
Else
' MsgBox "No file name specified."
frm!Imagn1.Object.FileName = ""
DoCmd.CancelEvent
End If
DoCmd.SelectObject A_FORM, "PhotoView"
Exit Function
ViewPhotoErr:
On Error GoTo 0
MsgBox "Viewing error. "
Exit Function
Resume
Return
End Function
frm!Imagn1.Object.UL 136463455, 1211342528, 1340341566, 10739
----------------------------
I currently use an access database for real estate data. I have a button
called "view" that when pressed is suposed to open a window with an image.
It actually opens a message box with "viewing error" then opens the window
with no image.
The button calls an event proceedure, or function named ViewPhoto2_Click.
(Pasted Below) This function calls another function titled
ViewCurrentPhoto() (also pasted below). This function errors at the line
beneath the explanation that says ('stupid liscence registration). I also
posted this line above. What is this command attempting to do and how can I
make it work?
-------------------------------------
Private Sub ViewPhoto2_Click()
On Error Resume Next
pfrm = "PhotoView"
TempData = Me!FileName
If FormIsOpen(pfrm) Then
' refresh the display
x = ViewCurrentPhoto()
Else
DoCmd.OpenForm pfrm
End If
End Sub
------------------------
Function ViewCurrentPhoto()
On Error GoTo ViewPhotoErr:
Dim frm As Form
Set frm = Forms!PhotoView
' load the file name & display image
Dim BufId As Long
Dim bm As String
fname = TempData
' stupid license registeration
frm!Imagn1.Object.UL 136463455, 1211342528, 1340341566, 10739
On Error GoTo 0
If IsSomething(fname) Then
frm!Imagn1.Object.FileName = fname
Else
' MsgBox "No file name specified."
frm!Imagn1.Object.FileName = ""
DoCmd.CancelEvent
End If
DoCmd.SelectObject A_FORM, "PhotoView"
Exit Function
ViewPhotoErr:
On Error GoTo 0
MsgBox "Viewing error. "
Exit Function
Resume
Return
End Function