M
MRichards
I'm trying to change the record source property within a form (which I've
done before) based on user-entered search criteria, but it is not finding
the table -- the same table that was the original record source. I get this
message:
"The Microsoft Jet database engine cannot find the input table or query
'SELECT * FROM tblRecords'. Make sure it exists and that its name is spelled
correctly."
The code looks like this:
strRecSource = "SELECT * FROM tblRecords " _
& "WHERE LastName like '" & strName & "'"
Me.RecordSource = strRecSource
Me.Requery
I have verified spelling (even copying/pasting from the actual table name).
I have commented out the WHERE clause so that it is just searching for a
table. I can copy this statement into a blank query in SQL view and it works
fine.
Any ideas are appreciated.
Thanks,
Mark
done before) based on user-entered search criteria, but it is not finding
the table -- the same table that was the original record source. I get this
message:
"The Microsoft Jet database engine cannot find the input table or query
'SELECT * FROM tblRecords'. Make sure it exists and that its name is spelled
correctly."
The code looks like this:
strRecSource = "SELECT * FROM tblRecords " _
& "WHERE LastName like '" & strName & "'"
Me.RecordSource = strRecSource
Me.Requery
I have verified spelling (even copying/pasting from the actual table name).
I have commented out the WHERE clause so that it is just searching for a
table. I can copy this statement into a blank query in SQL view and it works
fine.
Any ideas are appreciated.
Thanks,
Mark