I use a parameter query to tell me what age animals will be at a random projected date in the future. I would like to be able to see what parameter I typed on the resultant form or report. Is this possible? Thanks!
I use a parameter query to tell me what age animals will be at a random projected date in the future. I would like to be able to see what parameter I typed on the resultant form or report. Is this possible? Thanks!
Presuming you used something like [Enter date], a textbox with a control source of:
=[Enter date]
should show it and not prompt again, presuming you use the exact same text as the criteria.
Oh, you can also mix text in:
="Report run for: " & [Enter date]
Hi Paul and thanks for the tip. It didn't work for me - it asked me twice for the parameter instead. I created a text box saying =[Enter Required Date]
This is what I have in my query:
ProjectedAge: DateDiff("yyyy",[BirthDate],[Enter Required Date])-IIf(Format([BirthDate],"mmdd")>Format([Enter Required Date],"mmdd"),1,0)
Can you see any problems with it? Thanks again for your time.
If the spelling is exactly the same you shouldn't get prompted twice. Without the textbox you only get one prompt? Can you attach the db he Really?
Hi Paul and thanks again for your help,
I had tried using [Enter Required Date] on a report, which is where it prompted me twice. Yes, without the textbox I only get one prompt, and the query works. I made a form based on the same query, and tried putting the same text box on that, both in the header then in the detail section. Instead of prompting me twice, it came up with the message #name? I can't attach the database as even without data and with Compact and Repair it is 11Mb, who knows why! Look this isn't a big deal, it just would have saved me wondering if I'd typed the correct date.
Cheers Helen
in your query, you need to include [Enter Date] as a column on your query (no criteria) - something like
SELECT *,[Enter Date]
FROM myTable
WHERE someDate=[Enter Date]
Hi Ajax and thank you too for your contribution. I am still having no luck, please put it down to my novice status rather than your and Paul's advice. I'll post here if and when I get it to work.
Cheers Helen
Hi again Ajax and Paul and thanks for your helpon this problem. I was able to screen share with the lovely gurus at MelbPC Users, and they nudged me in the rightdirection, which was where you were already pushing me!
I created two new fields in theunderlying query’s Design Grid:
ReqdDate: [Enter Required Date]
ProjectedAgeateDiff("yyyy",[BirthDate],[ReqdDate])-IIf(Format([BirthDate],"mmdd")>Format([ReqdDate],"mmdd"),1,0)
Then we put the ReqdDate field in theheader of my report. Voila!
Thanks again, Helen