G
Guest
Hello,
I have this query i designed in the query design grid. THe problem occurs
where i have the If statement.
INSERT INTO tblBatchAudit ( change, OCDescription, tblPriBand_ID, tblCmd_ID,
tblObjClass_ID, tblFunction_ID, tblPrgrm_ID, tblAcct_ID, tblCIN_ID,
tblAudit_ID, rmks )
SELECT [enter % change as decimal]*[funded] AS change,
qryOCSums.OCDescription, qryOCSums.tblPriBand_ID, qryOCSums.tblCmd_ID,
qryOCSums.tblObjClass_ID, qryOCSums.tblFunction_ID, qryOCSums.tblPrgrm_ID,
qryOCSums.tblAcct_ID, qryOCSums.tblCIN_ID, if([change]>0,5,6) AS tblAudit_ID,
[Enter Audit Remarks] AS rmks
FROM qryOCSums
WHERE (((qryOCSums.OCCode)=[enter EOR]));
I'm trying to get the tblAudit_Id field to automatically input a 5 if the
user enters a positive number for [change] or a 6 if the user enters a
negative number.
thanks
Laura
I have this query i designed in the query design grid. THe problem occurs
where i have the If statement.
INSERT INTO tblBatchAudit ( change, OCDescription, tblPriBand_ID, tblCmd_ID,
tblObjClass_ID, tblFunction_ID, tblPrgrm_ID, tblAcct_ID, tblCIN_ID,
tblAudit_ID, rmks )
SELECT [enter % change as decimal]*[funded] AS change,
qryOCSums.OCDescription, qryOCSums.tblPriBand_ID, qryOCSums.tblCmd_ID,
qryOCSums.tblObjClass_ID, qryOCSums.tblFunction_ID, qryOCSums.tblPrgrm_ID,
qryOCSums.tblAcct_ID, qryOCSums.tblCIN_ID, if([change]>0,5,6) AS tblAudit_ID,
[Enter Audit Remarks] AS rmks
FROM qryOCSums
WHERE (((qryOCSums.OCCode)=[enter EOR]));
I'm trying to get the tblAudit_Id field to automatically input a 5 if the
user enters a positive number for [change] or a 6 if the user enters a
negative number.
thanks
Laura