Gustav Brock
Gustav at cactus.dk
Tue Jan 4 06:43:20 CST 2005
Hi Bobby By specifying them as parameters in the main query: PARAMETERS [Forms]![TempVars].[txtProjectID] Long; SELECT ... etc. The subquery will read them from the main query. If that doesn't help, try specifying the parameters in the subquery as well. /gustav >>> bheid at appdevgrp.com 04-01-2005 13:29:27 >>> No, I did not. How would I supply parameters to the subquery through the querydef? I know how to do it for the main query. Bobby -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, January 04, 2005 6:21 AM To: accessd at databaseadvisors.com Subject: RE: [AccessD] Weird query question Hi Bobby Did you try my suggestion specifying parameters? /gustav >>> bheid at appdevgrp.com 03-01-2005 21:10:57 >>> That is basically what I am doing. But in this case both the main query and it's subquery are accessing forms. If I make the subquery not access a form, it runs ok. So I have decided to just use a temp table to store the data and I will process the data in a few queries. Thanks to all who took the time to look at this issue for me. Bobby -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of dmcafee at pacbell.net Sent: Monday, January 03, 2005 2:55 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Weird query question Just getting into this thread (so I might have missed something if was already mentioned)... I usually have a form for this purpose with two fields (Start Date and End Date) and a command button. When the button is pressed this little pop up form is hidden and the report is opened. the reports (saved) queries and (saved) sub queries look to the hidden form for the start and end dates. The OnClose event of the report closes the date form so that it can be called again. HTH David McAfee