how to create cascading query at run time

dogdays

Active Member
Joined
Apr 28, 2008
Messages
434
Office Version
  1. 2007
I have a table tblFiscalGifts which contains an ID number, the amount of the gift and the source code for the gift. At run time a user may select n number of source codes from a listbox to select for a report. I would like to generate a series of queries or SELECT statements which would result in a record set of all ID numbers that gave to all the selected source codes e.g.
select the first code, then select the next code using the results of the previous select until the final set.

tia Jack
 
Kreszch68:
Thank you. I made one change set COUNT (ID) to >= to handle the issue of a patron donating more than once to the same fund raiser.
I do have one question- since I am the designer of the schema in question what did do that was wrong?
I am self taught in Access and would prefer not to make the same mistakes in the future.

tia Jack
 
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Jack, it's hard to tell how exactly you should set up you data as I don't have a complete picture of what you are doing.
But in general take in mind that you should always have a unique identifier for each record. This will make it so much easier to retrieve records.
 
Upvote 0

Forum statistics

Threads
1,215,518
Messages
6,125,291
Members
449,218
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top