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

Can't create and then use new passthrough in same function

Status
Not open for further replies.

TheBlueDog

Technical User
Aug 23, 2002
13
US
I'm trying in Access 2000 to create a SQL passthrough query and then use that new passthrough query as a form's recordsource in a single function. This worked in Access 97 but the same code won't in 2000 (WAH!!) - it's like the query isn't getting fully created in time to be used as a recordsource or something. The error I end up with is "Query must have at least one destination field", and when I check the database window I see a standard access query with no tables/SQL, with my assigned name in the database window, but it's not passthrough query and lacks the SQL I passed to it. Debugging indicates that my sql syntax works just fine when pasted into a passthrough...

I am trying to use the passthrough in order to be able to select certain rows (based on a different parameter each time the function is called, a lookup really) from a SQL table setting quoted identifiers off and then after the select back on within the query. This is to handle the circumstance of a lookup param with an apostrophe.

Anyone know how to make my first function work in 2000, or have another alternative to the apostrophe-parameter-lookup-formrecordsource thing?

Thanks to all for any ideas!!
(I can include code if anyone wants it)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top