I have a form with 3 command buttons, labeled "This Month", "Last Month" and
"This Year". It's the "pre-form" to another form that has a date field in
it.
The onclick property for each button opens the very same form, but I'd like
the query for the form to catch the dates for this month, or last month, or
this year respectively.
I have the queries developed and working, but it seems I should be able to
use one form, rather than use 3 basically identical forms that vary only in
the underlying query.
How?
Al Camp - 18 Oct 2005 02:22 GMT
Jerry,
You can programaticcally change the RecordSource for a form at any
time...
Me.RecordSource = 'Your SQL statement here...
But it might be easier to just filter the records according to a date
range by using the Filter and Filteron functions.

Signature
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
>I have a form with 3 command buttons, labeled "This Month", "Last Month"
>and "This Year". It's the "pre-form" to another form that has a date field
[quoted text clipped - 9 lines]
>
> How?