Sorry, I posted this in another thread, but it has been simplified and is an entirely different question.
Below, I would like to switch the where clause to say "WHERE [Num] <= [Cycles]", but when I do this, Access prompts me to enter "Cycles" as a parameter, instead of pulling the calculated value below:
<code>
SELECT DateAdd([ShortForm],[Num],[First]) AS [Pay Dates], Fix([Days]/[AverageDaysPer]) AS Cycles, [datee]-[Start] AS Days, [Forms]![Budgets]![txtEDate] AS Datee, BVendors.Vendor, BAccounts.FirstOccurrence AS [First]
FROM Numbers, Freq INNER JOIN (BVendors INNER JOIN BAccounts ON BVendors.ID = BAccounts.BVendor) ON Freq.ID = BAccounts.FreqDesc
WHERE (([Num]<=8));
</code>
The code is using "Num" to cycle through a DateAdd function like a Do-loop in VBA
Any ideas?
Thank you
Kavy
Below, I would like to switch the where clause to say "WHERE [Num] <= [Cycles]", but when I do this, Access prompts me to enter "Cycles" as a parameter, instead of pulling the calculated value below:
<code>
SELECT DateAdd([ShortForm],[Num],[First]) AS [Pay Dates], Fix([Days]/[AverageDaysPer]) AS Cycles, [datee]-[Start] AS Days, [Forms]![Budgets]![txtEDate] AS Datee, BVendors.Vendor, BAccounts.FirstOccurrence AS [First]
FROM Numbers, Freq INNER JOIN (BVendors INNER JOIN BAccounts ON BVendors.ID = BAccounts.BVendor) ON Freq.ID = BAccounts.FreqDesc
WHERE (([Num]<=8));
</code>
The code is using "Num" to cycle through a DateAdd function like a Do-loop in VBA
Any ideas?
Thank you
Kavy