How Do I Pass an Argument To A Query from a Form

elliot315

Mr. Question
Local time
Today, 18:48
Joined
Jun 3, 2007
Messages
98
Ok this is my situation, I have a form that passes 3 arguments to a query
Beginning Date
Ending Date
Period Of Time

The first two goes to a field of the query
but the third one not to a specific one but one created for the report
I called that field from the form to the report but I want that form to close after running the query, so the report won't show that field because the form is closed.. I have to pass that argument to the query so the report can be printed correctly

-----------------------------------------------------------------------
Date | Expr1
-----------------------------------------------------------------------
Between[FormTextField1] And How I call that field text to
[FormTextField2] this site? PERIOD Of TIME
 
If you're not using a table as the recordsource for the form yet, do that. Link the fields to the table. Then, as needed, reference the table to get the values you need. It doesn't matter if the form is open or not.
 
the problem is that the last argument is created by the user...is not in any table... that will be the title of the report... but theres no place for it in any table.. I just need that for a report
 
But a report is what it is. Why does it need a new title all the time?
 
part of the name of the report contains the period of time of the data collected...
for example

the report will display all the records fomr January 2007, so the title of the report will be... Report for January 2007
also could be the records form the first quarter
so The title will be Report for First Quarter of 2007.. and so on..
 
And why can't you store the user input in a table? Why not just have a table like "t_YourFormName_Settings" and throw in fields that store the user input? For example:

t_MainForm_Settings
Field: ReportTitle

Additionally, if that's an issue I'm not seeing correctly, then you can just make the Report Title a global variable and that makes it accessible whether or not the form is open.
 
I got it... I wrote the code in the query,... thanks
 

Users who are viewing this thread

Back
Top Bottom