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?
Who is Participating?
Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:

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

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.

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?
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 =""

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.
andymacfAuthor Commented:

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

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.