Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / October 2005

Tip: Looking for answers? Try searching our database.

Opening the same form with different queries

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jerry Crosby - 17 Oct 2005 23:54 GMT
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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.