Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 2498 1

Status
Not open for further replies.

craiogram

MIS
Feb 20, 2004
126
US
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
 
Hi!

If the form name is "CopyQuote_findCmdonJumper", try:

[tt]docmd.openform "CopyQuote_findCmdonJumper"[/tt]

Since the arguements you're using, is the default values, you can ommit them

Roy-Vidar
 
Have you tried this ?
DoCmd.OpenForm "Form_CopyQuote_findCmdonJumper", acNormal, , , acFormPropertySettings, acWindowNormal

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top