Here is my code for opening a form with 1 line of code. I am getting the "error 2498 - An expression you entered are is the wrong data type for 1 of the arguments. has occurred." As I step thru debug I can't see what is causing it...Please help!!
Private Sub cmdCpyQuote_Click()
On Error GoTo ErrCpyQuote
DoCmd.OpenForm Form_CopyQuote_findCmdonJumper, acNormal, , , acFormPropertySettings, acWindowNormal
Exit Sub
ErrCpyQuote:
Select Case Err.Number
Case 2501 'OpenReport or OpenForm Cancelled
Exit Sub
Case Else
Dim strMessage As String, strTitle As String
strMessage = "Error " & Err.Number & ", " & Err.Description & " has occurred."
strTitle = "Unexpected Error"
MsgBox strMessage, vbInformation + vbOKOnly, strTitle
Exit Sub
End Select
End Sub
Private Sub cmdCpyQuote_Click()
On Error GoTo ErrCpyQuote
DoCmd.OpenForm Form_CopyQuote_findCmdonJumper, acNormal, , , acFormPropertySettings, acWindowNormal
Exit Sub
ErrCpyQuote:
Select Case Err.Number
Case 2501 'OpenReport or OpenForm Cancelled
Exit Sub
Case Else
Dim strMessage As String, strTitle As String
strMessage = "Error " & Err.Number & ", " & Err.Description & " has occurred."
strTitle = "Unexpected Error"
MsgBox strMessage, vbInformation + vbOKOnly, strTitle
Exit Sub
End Select
End Sub