i have an access code which is working fine on one database but when i apply that code on other database it gives an error
Here is the code i applied on click to a button
how to fix this
You Can't Assign Value To This Object
Here is the code i applied on click to a button
Code:
On Error GoTo Err_Handler
Dim strPath As String
' open 'file open' dialogue and get path to selected file
strPath = GetFilePath()
If Len(strPath) > 0 Then
Me.ImagePath = strPath
Me.ctrlImage.Visible = True
Me.lblNoImage.Visible = False
End If
If Len(strPath) < 0 Then
Me.ctrlImage.Visible = True
Me.lblNoImage.Visible = False
End If
Exit_here:
Exit Sub
Err_Handler:
MsgBox Err.Description, vbExclamation, "Error"
Resume Exit_here
how to fix this