I am learning Access and write down three simple queries. It’s not efficient.
Could you help me to combine into one query?
I know basics about Excel VBA. But for Access VBA, I know nothing. Could you also help me use Macro to perform this function?
I appreciate your any help.
Happy Holiday.
Dennis


Q1_CombineData

[SELECT Claim, Amount
FROM old
UNION select Claim, Amount
from new;/]

Q2_SumClaim:
[SELECT Claim, sum(Amount) AS [Claim Amount]
FROM Q1_CombineData
GROUP BY claim;/]

Q3_Capped
[SELECT Claim, iif([Claim Amount]>=1000,1000,[Claim Amount]) AS Capped
FROM Q2_SumClaim;/]