473,397 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

HOW TO: Code Params for Report

I am using Microsoft Access 2000.

I am designing a report using an aggregate query parameterized on a
date range. I am using a form for users to select the range, allowing
"First Quarter 2005" to produce global variables for both gsStart
(e.g.-"07/2004") and gsEnd (e.g.-"09/2004").

I want to feed the dates to the report query programmatically. If I
build the query with a WHERE option for the date field and add a
BETWEEN clause, I can't find a way to NOT have the dialogs for
inputting each param.

How do I do this? I've tried Googling on it, but haven't found the
magic search string that'll bring up the info I need.
Can anyone help me, or am I beyond all help?

TIA...

Neill

Nov 13 '05 #1
2 1407
"Wayfarer" <ne**********@gmail.com> wrote in message
news:10*********************@z14g2000cwz.googlegro ups.com...
I am using Microsoft Access 2000.

I am designing a report using an aggregate query parameterized on a
date range. I am using a form for users to select the range, allowing
"First Quarter 2005" to produce global variables for both gsStart
(e.g.-"07/2004") and gsEnd (e.g.-"09/2004").

I want to feed the dates to the report query programmatically. If I
build the query with a WHERE option for the date field and add a
BETWEEN clause, I can't find a way to NOT have the dialogs for
inputting each param.

How do I do this? I've tried Googling on it, but haven't found the
magic search string that'll bring up the info I need.
Can anyone help me, or am I beyond all help?

TIA...

Neill


If you've created a form (say, frmRange) for the user to enter the range,
then the simplest thing would be, instead of using global variables, to put
your start and end values into a pair of hidden textboxes on the form (say,
txtStart and txtEnd). Then, in the query, replace the parameters with
references to the form e.g.

BETWEEN [Forms]![frmRange]![txtStart] AND [Forms]![frmRange]![txtEnd]
Nov 13 '05 #2
"Wayfarer" <ne**********@gmail.com> wrote:
I am designing a report using an aggregate query parameterized on a
date range. I am using a form for users to select the range, allowing
"First Quarter 2005" to produce global variables for both gsStart
(e.g.-"07/2004") and gsEnd (e.g.-"09/2004").

I want to feed the dates to the report query programmatically. If I
build the query with a WHERE option for the date field and add a
BETWEEN clause, I can't find a way to NOT have the dialogs for
inputting each param.

How do I do this? I've tried Googling on it, but haven't found the
magic search string that'll bring up the info I need.
Can anyone help me, or am I beyond all help?


Create the Where clause of the docmd.openreport line using VBA code.
Microsoft Access Report Printing Criteria Selection Form
http://www.granite.ab.ca/accsrprt.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Brian Beck | last post by:
Hi. I'm having some problems with code based directly on the following httplib documentation code: http://www.zvon.org/other/python/doc21/lib/httplib-examples.html I've included the code and...
2
by: Tobias Olbort | last post by:
Hello, i've a outer function, which takes a params-array as a parameter. I want to pass this array to inner function with a params-array (e. g. string.format). When i've passed an integer to...
2
by: Craig in Boulder | last post by:
I have been trying for over a week to get data from my stored procedure into a Crystal Report in VS.NET 2003 with no luck. I have all sorts of code parts but nothing that tell me how then go...
3
by: Stan Huff | last post by:
Is there any way to disable the "params" on a particular invocation so that one can pass an array containing the arguments and not have receiver get an array having you argument array stuffed into...
3
by: Brian Blais | last post by:
Hello, I am including at the end of this document (is it better as an attachment?) some code for a small gui dialog. Since I am quite new to this, if anyone has any suggestions for improvements...
24
by: Skijor | last post by:
I have inherited a php script that nests php, javascript, and html. How do I clean up code like this: I think I can move the javascript into a seperate .js file at the least. What about the...
3
by: knkk | last post by:
I have a link called "Save" on a page of mine, which, when clicked on (the url is typically like this) javascript:savesubmit('form31','results31','1','movies','178'), calls a javascript function...
1
by: hmbscully | last post by:
I am trying to send a complex mutli-part email with inline attachments between html pieces. I originally wrote the code in Perl with the MIME::Lite module, which worked fine. My attempts to...
1
by: dzaf | last post by:
Hello, My question is simple and I have not seen an answer so far having surfed the web endlessly. I run a Kids Flash Games Website: http://www.doron-zur.com Some of the games require Full...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.