?
Solved

Access form or code to ask for different fields to change in query

Posted on 2012-08-28
3
Medium Priority
?
329 Views
Last Modified: 2012-08-29
I would like to create an Access form or code that would ask the following.

What type of fields do you want data for:

1) Resp_id
      OR
2) Ppty_ID
      OR
3) Multiple ppty_ids

Based on the above selection, then if a person selects #3 it would say:

Please enter the multiple ppty_ids you want data for:

Then the query would execute with the above criteria, and would output to an Excel file, SvyData.xlsx.

Query is in attached Access file.

Could someone please help with how to do this?

Thanks!
Form-for-Query-Parameters.accdb
0
Comment
Question by:Patty01Access
  • 2
3 Comments
 
LVL 31

Accepted Solution

by:
hnasr earned 2000 total points
ID: 38344814
Try this sample database.
Run Form1
Select Field
Click Work! Button
Enter criteria: single 1  or multiple 1, 2

Check file D:\myOutput.xls
Form-for-Query-Parameters-2.accdb
0
 

Author Closing Comment

by:Patty01Access
ID: 38345679
BEAUTIFUL!!!  Thanks much Hnasr!!

I never knew there was an "In..." criteria you could use in a query.

Thanks again,
Patty
0
 
LVL 31

Expert Comment

by:hnasr
ID: 38346700
Welcome!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question