view parametered criteria from qeury in report as header

pretoria

Registered User.
Local time
Today, 04:03
Joined
Jul 23, 2005
Messages
30
Does anyone have an idea how I could include variables I input in a query to that of a report header?

I have a date stamp in a query. In that query I entered the BETWEEN [ENTER START DATE:] AND [ENTER END DATE] paramater. In the ensuing report this query is based on I would like to include in the header of the report the two dates I entered in the criteria/variables parameter fields entered.

Thanks,
 
Put this in a textbox:

= "BETWEEN " & [ENTER START DATE:] & " AND " & [ENTER END DATE]
 
works but..

thanks, but does that mean I have to enter data 4x now? I was hoping go get the variables on the report for the first two date questions asked embedded in the query itself. It seems a bit inefficient and open for mistakes if you enter two different set of dates.
 
Pretoria,

The best way is to use a little popup form for the user to enter
the parameters.

= "BETWEEN " & Forms!YourPopUp!StartDate & " AND " & Forms!YourPopUp!EndDate

Obviously, the query should reference the dates using the same syntax.

Wayne
 
As long as you type in the criteria exactly the same as the textbox, you will only be asked once for the criteria. Though I agree with Wayne about using forms for the criteria.
 
I might be missing something but I am getting an error which says that spacebar is not a valid shortcut - presumably due to the & character being used to precede a shortcut letter/digit?

Ruth
 
Was this post intended for this thread? It doesn't seem related, as you wouldn't need a shortcut in a parameter prompt I wouldn't think.
 
Yes it was in response to the above. When I put that code into an unbound text box (i.e. = "BETWEEN " & [ENTER START DATE:] & " AND " & [ENTER END DATE] replacing the text in square brackets with the criteria from my query) I get an error message which says, as I posted, that the space bar can't be used as a shortcut.

Ruth
 
Think I figured it out - I was putting it in the Page Header and not the Report Header - I'm guessing it won't work on page header (where I need it to be)?

Ruth
 
No, I put those in page headers all the time. What exactly is the control source?
 
Hurm, just tried it again and it seems to work now - I guess I must have had a typo and/or missed some punctuation somewhere along the line *scratches head and goes to hide under a rock somewhere*
 

Users who are viewing this thread

Back
Top Bottom