mistyinca1970
Member
- Local time
- Yesterday, 17:08
- Joined
- Mar 17, 2021
- Messages
- 117
OK, I am stumped on this one. I have a project in which I will be using a form's combo boxes to provide the criteria in a query in order to generate a report. My problem is that I have a table that has multiple year values. Here's the table:
I want to have a combo box direct to one of the annual Distributions. I can do this fine, if I'm directing the criteria of a field to a combo box, but how do I write the query to look in one of either of these fields (2017, 2018, 2019... etc).
Basically, I would have a form with a combo box that has each of these distribution years to be selected.
This part here:
is what I want changed by the combo box option.
I want to have a combo box direct to one of the annual Distributions. I can do this fine, if I'm directing the criteria of a field to a combo box, but how do I write the query to look in one of either of these fields (2017, 2018, 2019... etc).
Basically, I would have a form with a combo box that has each of these distribution years to be selected.
Code:
SELECT tblDistribution.City, tblDistribution.[2021Distribution], [AvgOfDistribution]*[2021Distribution] AS DistributionAmt
FROM qrySysEnhancDistribution INNER JOIN tblDistribution ON qrySysEnhancDistribution.EffectiveZone = tblDistribution.EffectiveZone;
This part here:
Code:
tblDistribution.[2021Distribution]