Entering a saving a parameter for further use

In order to change one of the titles on a report, I enter a date value when I open the report.  However, I want to store this date value so that I can use it in other parts of my report.

Can someone assist please?
Andy
LVL 7
andymacfAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jeffrey CoachmanMIS LiasonCommented:
You did not post the specifics on how you are actually entering the date and how it comes to be inserted on the Report
parameter prompt?
Inputbox?
Form textbox value


In any event:
Create a public variable in a Module:

    Public dtmpubYourDate as date

On your code to open the report add this in:
    dtmpubYourDate = [The same value you enter normally]

Then on the close event of the report do this:
    dtmpubYourDate =""

JeffCoachman
0
andymacfAuthor Commented:
Hi Jeff

Yes, having re-read my question it is far too vague so apologies for that.

What I am trying to achieve is to use my report as a 'Before' and 'After' report and by entering this date, I filter information differently according to where the exam date is compared to todays date.  

So, I have an unbound textbox in my Report Header with the following:
=IIf([Enter exam date (ddmmyy)]<=Date(),"Pre Standard Setting","Post Standard Setting")

Open in new window



and it is this 'entered' date that I would like to use in other elements of the report.

Note: this may sound strange but the actual exam date only appears as part of an overarching title in the format '2013-11-03_AAA_111'.

The other alternative would be if i could in some way extract the exam date from the title above.

I hope this makes it a wee bit clearer.
Andy
0
Jeffrey CoachmanMIS LiasonCommented:
OK,

Notes:
You made no referenc to actually "filtering" the report based on this date...?
You really need to require a 4 digit year, else it will be a nightmare to validate the dates
It is not clear how you are translating values typed in with the format: ddmmyyyy, into atual dates
I am using the US Date system on my computer, (Just FYI), so I could not test this system using your Date format...

All this aside, ...It would be best if you refined your approach to provide the user with a form to enter the date.
With a form, you can:
Do what you are aking "easliy"
Change this date easily without having to open the report
Validate the date so that only valid dates are entered
...etc

Here is a sample database, ...it works as you specifed for the US dates

Examine and test it fully
Then try to adapt it to your database.

Jeffcoachman
Database174.mdb
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
andymacfAuthor Commented:
Jeff

Many thanks for this, have adapted as you suggested and works a treat.

Regards
Andy
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.