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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Querying DB from VBA Form

Status
Not open for further replies.

TidyTrax

Programmer
Jul 11, 2001
263
AU
I am using code like this to query my DB from a form, this form is a dynamic query generator the code i am using to use SELECT statement on the database is

SqlString = "SELECT * FROM tblInput WHERE(location='Aberdeen')"
CurrentDb.QueryDefs("Query1").SQL = SqlString
DoCmd.OpenQuery "Query1"

This is a simplified version of the code but i still get the same error - it is - Run Time Error '3265' - Item Not Found in This Collection.

Now this is an extremely simple query and i cant even get that to work!!! Help!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top