UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> User input carried over to Report    
 
   
jfield00
post Dec 29 2004, 03:17 PM
Post #1

UtterAccess Addict
Posts: 102



I have a query that asks the user to enter a range of dates. Basically in the criteria line, I have this...

Between [Enter Beginning Date] and [Enter End Date]

Now, in my report in the report header, it looks like this...

Major Projects Report


"Between 7/1/2005 and 12/31/2005"

Now, as it is now, you have to manually go in and type the dates in that box. How can I set it up so that when the user inputs their dates from the query, it will be applied to a text box or something so they do not have to go in and manually change their date range?

Thanks anyone for help.
Go to the top of the page
 
+
manrav
post Dec 29 2004, 03:44 PM
Post #2

New Member
Posts: 5



One way would be to have the user enter the start dates and end dates in 2 text boxes on a form. The criteria for your query could point to the form.
For the report create a new text box and you could set the value to = "Between" & " " & [forms]![form1].[start date] & " " & "and " & [forms]![form1].[end date]

** [start date] and [end date] would be the names of the text boxes on the form.
Go to the top of the page
 
+
jfield00
post Dec 29 2004, 03:53 PM
Post #3

UtterAccess Addict
Posts: 102



Thanks for your help. I'm out for the day, but I'll check that tomorrow. thanks again.
Go to the top of the page
 
+
lawmart
post Dec 29 2004, 05:53 PM
Post #4

UtterAccess VIP
Posts: 2,215
From: Vermont, USA



I would agree with manrav that a form would be a good way to go.
For now you can add a text box and set its controo source to
="Between " & [Enter Beginning Date] & " and " & [Enter End Date]
Go to the top of the page
 
+
jfield00
post Jan 5 2005, 12:13 PM
Post #5

UtterAccess Addict
Posts: 102



What do I put in the query to have it point to the form? Something like this...

Field: Finish_Date
Table: Project_Table
Criteria: Between [forms]![DateRangeFormTextBox].[BeginningDate] And [forms]![DateRangeFormTextBox].[end date]

When I put that in, an error message comes up saying..
"Enter Parameter Value"
"Forms!DateRangeFormTextBox.BeginningDate"

What is the problem here?
Go to the top of the page
 
+
lawmart
post Jan 6 2005, 10:20 AM
Post #6

UtterAccess VIP
Posts: 2,215
From: Vermont, USA



The syntax is correct.

Make sure sure of the control names
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 23rd May 2013 - 02:05 AM