run-time error 3131

jenswave25

New member
Local time
Yesterday, 21:22
Joined
Jun 8, 2006
Messages
7
Please help - cannot figure out why the search form I have keeps returning the run-time error 3131. Syntax error in FROM Clause. Everything looks good, and I have even rennamed objects in hopes that I didn't steel a naming convention. Put brackets around qrys etc. Nothing, so please anyone (a new set of eyes would be great). Below is the code line returning the error.

Private Sub btnSearch_Click()

' Update the record source
Me.frmsubSearchResults.Form.RecordSource = "SELECT * FROM [qryRecordsData] " & BuildFilter

' Requery the subform
Me.frmsubSearchResults.Requery
End Sub
 
It would be helpful to know what BuildFilter did.
 
Sorry mate, could not get your point at all.
 
Thanks

Thanks pbaldy - the error was in the BuildFilter. Specificaly it was trying to filter for a field that was removed. Removed the unnecessary code for the field and the BuildFilter worked and so did the Search.
 

Users who are viewing this thread

Back
Top Bottom