Data type mismatch access 2010

foxtet

Registered User.
Local time
Today, 22:55
Joined
May 21, 2011
Messages
129
Hi I need your help to over come the error.
When I double click the item in the list box it gives run time error 3464.
the code is

Private Sub SearchResults_DblClick(Cancel As Integer)
DoCmd.OpenForm "frm_FileContents", , , "fileNumber =" & Me.SearchResults
'DoCmd.OpenForm "frm_FileContents", , , "[FileNumber] =" & Me![SearchResults]

'Dim stDocName As String
' Dim stLinkCriteria As String

' stDocName = "frm_FileContents"

' stLinkCriteria = "[FileNumber]=" & Me![SearchResults]
' DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
 

Attachments

Is FileNumber a Text type? If so make sure you enclose them in between single quotes.
 
3464 - data type mismatch in criteria expression

Perhaps your FileNumber is actually a textfield, try:
DoCmd.OpenForm "frm_FileContents", , , "fileNumber ='" & Me.SearchResults & "'"
 
Last edited:
FYI, thread moved to Forms forum.
 
3464 - data type mismatch in criteria expression

Perhaps your FileNumber is actually a textfield, try:
DoCmd.OpenForm "frm_FileContents", , , "fileNumber ='" & Me.SearchResults & "'"


Thank you a lot..
it worked :)
 

Users who are viewing this thread

Back
Top Bottom