Connecting Tech Pros Worldwide Help | Site Map

Parameter Query

Matt W via AccessMonster.com
Guest
 
Posts: n/a
#1: Nov 13 '05
I based my parameter query off the following posting, but can't seem to work
out a little kink. I cannot bring up a report without first typing in the
month and year three times. The first time for my Form [mm/yyyy], the second
for the [Enter Month and Year mm/yyyy] parameter form, and the third [Date]
which I can't figure out where on earth that one came from. How do I clean
this up so I can type in the criteria just once into the form I created? I
tried putting [forms]![month/year]![mm/yyyy] in the criteria for the GetMonth
field but I still got promted twice and the report all came back with #error!

Original Posting:

Create a query.
Include all the fields needed in the report.
Add a new column to the query grid.

GetMonth:Format([User_Date],"mm/yyyy")

As criteria parameter for this column write:
[Enter Month and Year mm/yyyy]

The month and year can be entered using 06/2004.
If you want the full written month name entered (which is unnecessary
for the result), change mm/yyyy to mmmm/yyyy in both the column
expression and inside the prompt brackets.


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200508/1
the chiller
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Parameter Query


Have a look at this
http://office.microsoft.com/en-us/as...170771033.aspx
, scroll down to "Creating a form to supply parameters to a query".

You can also download the sample form at
http://www.microsoft.com/downloads/d...displaylang=en

Matt W via AccessMonster.com
Guest
 
Posts: n/a
#3: Nov 13 '05

re: Parameter Query


Thanks. Just needed a push.

the chiller wrote:[color=blue]
>Have a look at this
>http://office.microsoft.com/en-us/as...170771033.aspx
>, scroll down to "Creating a form to supply parameters to a query".
>
>You can also download the sample form at
>http://www.microsoft.com/downloads/d...displaylang=en[/color]


--
Message posted via http://www.accessmonster.com
Closed Thread


Similar Microsoft Access / VBA bytes