Date Range Automatically Input Onto Header

Chineham

Registered User.
Local time
Today, 21:17
Joined
Apr 10, 2002
Messages
21
I have managed to do this before where I have a form running from a query that has a prompt in the criteria such...[Enter start date:].by using an unbound text box and entering [Enter start date:] as the 'control source' the date input is automatically updated in the header. But... and there is always a but! I have a form with a graph on it and this does not work.

Any ideas :-(
 
The way I've done this before is:

On the date that you want searching on have:

Between [Start Date dd/mm/yy] And [End Date dd/mm/yy]

Then have a 'new field' in your query grid:

Dates: [Start Date dd/mm/yy] & " to " & [End Date dd/mm/yy]

Then you need to put your new field Dates in your report and it will automatically post your dates in.

In your new field you do need to enter it exactly as it appears in square brackets on your criteria row.

I've not tried it with two separate date entries, always Between, but I presume it would be the same principle, but you just make 2 new fields.

HTH

[This message has been edited by Ally (edited 04-23-2002).]
 
I'll have a go.

Cheers

Sarah
 
Nope, doesn't work.

It's really weird I do this kind of thing all the time, but, now that there is a graph in the form it won't work.

It's got something to do with the graph for definite.

Anymore ideas?

[This message has been edited by Chineham (edited 04-23-2002).]
 
No, sorry. A stab in the dark ... could it be something to do with any date fields that relate to the graph interfering with the dates in the report?
 
The field I am using to search in does not appear on the graph. But there is one query attached to the form that contains the criteria information for the prompt and there is the other query that powers the graph. Could this have something to do with it?

Have you tried putting in a dummy graph into a form and seeing if it's not just me that's doing it all wrong?
 
Unfortunately, I’ve never used graphs. Tried once and decided to stick to copying information into Excel and doing them that way. My colleague has done a couple of graphs, so I looked at them but they’re single graphs in a form, not a report, so there’s no other data related. Sorry, I can’t be of any more help.
 
Let's use a process of elimination, let's check these to start with:

1. Is the form bound to the correct query?
2. if so is the text suchas:

=[Start Date dd/mm/yy] & " to " & [Start Date dd/mm/yy]

being added to an unbound control as the control source?

3. Is the name of the unbound control the same as another control on the form? or the same as one in the underlying data source? If so change it to something unique.

4. If you make a copy of the report and remove the graph does it work?

5. Do you use exactly the same criteria for both the graph and the report - could there be some ambiguity as to which date to take.

6. Had you considered using a reference to a form field instead of a parameter input box suchas:

="Between " & Forms!MyForm!MyField & " and " & Date()

Ian
 

Users who are viewing this thread

Back
Top Bottom