PC Review


Reply
Thread Tools Rate Thread

Choosing values for queries

 
 
Scot B
Guest
Posts: n/a
 
      1st Apr 2004
Greetings,

Newbie question - I have a database to store comparable home information for
a real estate appraiser. He would like a form of some type where he can set
parameter values before running a query. This is something where he could
pick a minimum square footage, a zip code, number of bedrooms...then run the
query.

I know how to make a query prompt for parameters, but there are too many
variables to go through for every query. I can have him go into the query
in design view and set parameters, but that's not very "user friendly".

Any suggestions for how to handle this?

Thanks a ton for your help and expertise!

Cheers,

Scot B.


 
Reply With Quote
 
 
 
 
JulieD
Guest
Posts: n/a
 
      1st Apr 2004
Hi Scot

here's an answer i provided to a user with a very similar question - it
should get you started (they asked specifically about a date parameter, but
it can be adapted for any field
****
create a query and in the CRITERIA line of the date field (the one you want
to use as the input parameter) type
[Enter Date]
now run the query and you will see that you are prompted to enter the date -
now build a report based on this (using the report wizard) and then when you
run the report you will be prompted for the date

then to make it nice and neat, create a form with an unbound text box (and
name the text box something like RPTDATE) then, go back to the query and
change the criteria to
Forms![whatever you called the form with the date on it].RPTDATE (use the
expression builder to get the exact syntax)

- put a button on this form - use the command button wizard, choose Report
Operations - Preview a Report (or whatever the exact wording is) - select
the appropriate report

now when you open the form, enter the date, press the button - the report
will display the information you want
***

let us know how you get on
and BTW you really don't need to post to so many groups - just choose one
that you think is most relevant - a lot of the responders here read a number
of groups.

Cheers
JulieD


"Scot B" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Greetings,
>
> Newbie question - I have a database to store comparable home information

for
> a real estate appraiser. He would like a form of some type where he can

set
> parameter values before running a query. This is something where he could
> pick a minimum square footage, a zip code, number of bedrooms...then run

the
> query.
>
> I know how to make a query prompt for parameters, but there are too many
> variables to go through for every query. I can have him go into the query
> in design view and set parameters, but that's not very "user friendly".
>
> Any suggestions for how to handle this?
>
> Thanks a ton for your help and expertise!
>
> Cheers,
>
> Scot B.
>
>



 
Reply With Quote
 
 
 
 
Denny G.
Guest
Posts: n/a
 
      1st Apr 2004
Consider using a Query By Form (QBF). Go to Web Site:
http://support.microsoft.com/default.aspx?scid=kb;en-
us;209645&Product=acc where you will find Microsoft
Knowledge Base Article - 209645 to show you how it is
done. I have used this technique a lot and it works
great.

Denny G.

>-----Original Message-----
>Greetings,
>
>Newbie question - I have a database to store comparable

home information for
>a real estate appraiser. He would like a form of some

type where he can set
>parameter values before running a query. This is

something where he could
>pick a minimum square footage, a zip code, number of

bedrooms...then run the
>query.
>
>I know how to make a query prompt for parameters, but

there are too many
>variables to go through for every query. I can have him

go into the query
>in design view and set parameters, but that's not

very "user friendly".
>
>Any suggestions for how to handle this?
>
>Thanks a ton for your help and expertise!
>
>Cheers,
>
>Scot B.
>
>
>.
>

 
Reply With Quote
 
Rolls
Guest
Posts: n/a
 
      1st Apr 2004
You should not post to multiple newsgroups!

Short answer - The multiple criteria that are selected on your form need to
be transferred into a WHERE clause of a SELECT statement. Build this SQL
string, save the query definition, then run it to return a query result that
will generate data for your form or report.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
choosing between queries when opening form scottyboyb Microsoft Access Form Coding 5 12th Jan 2009 01:54 AM
choosing data using "in" in join queries toby Microsoft Access Queries 2 19th May 2004 10:26 AM
Choosing values for queries Scot B Microsoft Access 3 1st Apr 2004 06:09 PM
Re: Choosing values for queries Rolls Microsoft Access Form Coding 0 1st Apr 2004 06:09 PM
Choosing values for queries Scot B Microsoft Access Forms 1 1st Apr 2004 02:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:47 PM.