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 / Queries / April 2008

Tip: Looking for answers? Try searching our database.

Using a Form to Select Query Values for Report

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
serno001@yahoo.com - 23 Apr 2008 02:39 GMT
Hello all,

I am looking for a site that would provide a tutorial to design a form
that allows the user to select the specific values (pull down menus)
for each query value. These query values, once set, would be used
to develop a report.

Any help would be welcomed
Klein-4 - 23 Apr 2008 04:20 GMT
On Apr 22, 8:39 pm, serno...@yahoo.com wrote:
> Hello all,
>
[quoted text clipped - 4 lines]
>
> Any help would be welcomed

I don't know of a tutorial for this, but the procedure is
straightforward.

You create a form with combo boxes listing criteria to be used in the
query.  Let's say this form is called frmCrit.  Then you use the
results of the criteria selected on frmCrit as criteria in the query
(let's call it qryCrit).  For instance, let's say there is a combo box
on frmCrit called cboCrit0.  You reference this in qryCrit in the
condition row for the corresponding field in the query as such Forms!
frmCrit!cboCrit0.  Essentially, on frmCrit you attach code to a button
or combo box etc. that opens the report based on qryCrit once all the
required criteria are selected.

If this doesn't make sense, I can create a little instructional
database to illustrate this and e-mail it to you...

Ross La Haye
John Spencer - 23 Apr 2008 12:36 GMT
Check out this article for a detailed discussion.
    http://www.fontstuff.com/access/acctut08.htm

Or check out this from MS
   http://office.microsoft.com/en-us/access/HA011730581033.aspx

Or for another example
http://allenbrowne.com/ser-62.html

A brief quote from a John Vinson (Access MVP) posting.

You'll need to create a small unbound Form (let's call it frmCriteria) with a
Combo Box control (cboCrit) on it. Use the combo box wizard to select the
table for the selections, and be
sure that the bound field of the combo is the value you want to use as a
criterion. Save this form.

Now use

=[Forms]![frmCriteria]![cboCrit]

as the criterion in your Query.

It's convenient to base a second Form or Report on the resulting query to
display the results; if you put a button on frmCriteria to launch that form or
report, the user can enter the criterion and view the results in one simple
operation!

End quote

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

> On Apr 22, 8:39 pm, serno...@yahoo.com wrote:
>> Hello all,
[quoted text clipped - 23 lines]
>
> Ross La Haye
 
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



©2009 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.