Passing parameter to query from multiple forms 
Author Message
 Passing parameter to query from multiple forms

Is there a way to use the same query for a report and a form given that the
query has parameters.  Basically what I want to do is pass the parameter
from a calendar object in Access.  I don't want an action box to pop up
asking me for the date.  Right now I have hardcoded in the Query where the
parameter should reference its data from like
[forms]![frmForm]![txtquerydate].  So the query only works properly if you
access it from the form and not the report.  Is there a better way to do
this so that the query can be reused and passed a generic parameter from any
form without explicitly specifing the Form name and such. Thanks


Fri, 18 May 2001 03:00:00 GMT  
 Passing parameter to query from multiple forms
Is there a way to use the same query for a report and a form given that the
query has parameters.  Basically what I want to do is pass the parameter
from a calendar object in Access.  I don't want an action box to pop up
asking me for the date.  Right now I have hardcoded in the Query where the
parameter should reference its data from like
[forms]![frmForm]![txtquerydate].  So the query only works properly if you
access it from the form and not the report.  Is there a better way to do
this so that the query can be reused and passed a generic parameter from any
form without explicitly specifing the Form name and such. Thanks


Fri, 18 May 2001 03:00:00 GMT  
 Passing parameter to query from multiple forms
I would suggest making the recordsource of the report as a temporary table which
is created just before opening the report by running a make table query off the
parameter query you have in question...

HTH

--
Manish Jha

Author of the Access Addin for developers
 Data Flow Manager

Visit
http://pages.prodigy.net/manishj/psdfm.htm

Quote:

> Is there a way to use the same query for a report and a form given that the
> query has parameters.  Basically what I want to do is pass the parameter
> from a calendar object in Access.  I don't want an action box to pop up
> asking me for the date.  Right now I have hardcoded in the Query where the
> parameter should reference its data from like
> [forms]![frmForm]![txtquerydate].  So the query only works properly if you
> access it from the form and not the report.  Is there a better way to do
> this so that the query can be reused and passed a generic parameter from any
> form without explicitly specifing the Form name and such. Thanks



Tue, 22 May 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Passing multiple parameters to Access query using Form List Box

2. How to pass single, multiple or null parameter value(s) to multiple queries

3. Parameter passing between a form and a query

4. passing parameters to a sql query from a vb form

5. Passing parameters from Visual Basic forms to Access queries

6. passing parameter to a parameter query

7. Passing Parameters to stored parameter queries using VB 5's Data Controls

8. Passing Parameters into a Pass-Through Query

9. Passing parameters to SQLServer using a Pass-Through query

10. Pass Parameter from form to form

11. How can I pass parameter from a form to another form

12. calling parameter query from a parameter query

 

 
Powered by phpBB® Forum Software