I'm a semi-newby, and I have limited experience with update queries. Basically, I have some fields in a table from which I make a couple of calculations. What I then want to do is update two blank fields in that same table with the calculated data. I've written a select query that gives me the information I need: Count and Amt. Here is the select query:
SELECT ExportData.FAMLYID, ExportData.M1ID, ExportData.M2ID, ExportData.M3ID, ExportData.M4ID, IIf([M2ID] Is Null,1,IIf([M3ID] Is Null,2,IIf([M4ID] Is Null,3,4))) AS [Count], IIf([Count]=4,1550,IIf([Count]=3,1500,IIf([Count]=2,1440,720))) AS Amt
What do I need to do in order to map [Count] to the Database field Mbrs and [AMT] to the Database field Dues?
UPDATE ExportData SET
ExportData.Mbrs = IIf([M2ID] Is Null,1,IIf([M3ID] Is Null,2,IIf([M4ID] Is Null,3,4))),
ExportData.Amt = IIf([M2ID] Is Null,720,IIf([M3ID] Is Null,1440,IIf([M4ID] Is Null,1500,1550)));