Help

ian_ok

Registered User.
Local time
Today, 20:54
Joined
May 1, 2001
Messages
90
I have a query that users have to enter a date for the records to show, it opens the form, but then on pressing a button to open the word doc that is linked to it, I get the request to enter the date again.

Any ideas how to stop the second date request?

thanks Ian
 
Hi Ian

How have you set up the dates that the users have to enter to get the form open? Are these dates parameters in your query behind the form? If so, you could change the reference to a stored value (i.e. in a temp table) that your report could also reference. At the moment it sounds like you are opening the report, which also runs from a parameter query (probably the same underlying query), and naturally the report calls upon the query which has dates still to be determined.

Alternatively you could create a variable in a module to temporarily store these dates and then when you run the OpenReport coding you could use the variables as part of a LinkCriteria argument.

Or you could create unbound text boxes for the dates on the switchboard from where you open your form as in ...

http://www.access-programmers.co.uk/ubb/Forum3/HTML/002286.html

HTH

Rich Gorvin



[This message has been edited by Rich@ITTC (edited 10-09-2001).]
 
Rich,

I have the query run a paramenter value box, with the below data in the criteria section..

<=[Enter in the last date of the GSR]

You enter in, in 20/10/01 format, after this it opens up the form (not a report), which lists the people, here you have an option of merging with 3 letters from command buttons, these letters are held in word documents, on pressing a button it prints the list and SHOULD open the word document...At this point it then requests the date again.

Ian
 
Hi Ian

I did understand that your criteria was in a query that was used to open a form. However, it would seem that your report also runs from this same query (or this query is combined with other tables and/or queries to supply data for the report). The date put in for this parameter request is ephemeral - once the query is run to open the form the entered date is forgotten by Access (that is the nature of a parameter query ... the data entered by the user is used in a one-off way). So you will need to either store this date somewhere (i.e. in a temp table or within a module) or you will need to keep the open the switchboard/form from which you open the form concerned and have on that switchboard an unbound text box with the date in it. See my suggestions above, which still apply.

HTH

Rich Gorvin



[This message has been edited by Rich@ITTC (edited 10-10-2001).]
 

Users who are viewing this thread

Back
Top Bottom