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 / General 2 / March 2007

Tip: Looking for answers? Try searching our database.

Access 2003 Rookie Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
knowshowrosegrows - 29 Mar 2007 18:50 GMT
I want to create a button on a form that will ask me to specifiy a date range
and then apply that date range to two seperate queries and give me both
results.  

How do I begin to think about this?
Signature

Thanks

Jeff Boyce - 29 Mar 2007 20:14 GMT
Start with a form that has two text controls.  Use the labels to indicate
which will hold a start date, and which will hold an end date.

Create a query that returns data you want to see.  Since you are describing
a "date range", one of the fields of data available must be a date field.
Use parameters in the Selection/criterion "cell" under that date field.
Your parameters will look something like:

   Between Forms!YourForm!txtYourStart And Forms!YourForm!txtYourEnd

NOTE -- this approach will only work if the form is open, and the controls
have date values.

One more step -- in design view of the form, add a command button that opens
the query.

When you have this much working, work on the second query using the same
approach.  Rather than add a second command button, consider adding the code
that opens the second query to the first command button.

Regards

Jeff Boyce
Microsoft Office/Access MVP

>I want to create a button on a form that will ask me to specifiy a date
>range
> and then apply that date range to two seperate queries and give me both
> results.
>
> How do I begin to think about this?
 
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.