R
Randy
Can an Iif statement be used in this append query? What I need is after
WHERE ,,IIF [EndCertNolbl] is Null then I want only the [BeginCertNolbl]
appended. If [EndCertNolbl] is populated or Not Null than the following
code is correct...Thanks...Randy
INSERT INTO CheckedOutCertsAllNumbers ( CertNo, Inspector, TypeOfCert,
DateCheckedOut, BeginingCertInitial )
SELECT [N]+[Forms]![frmCheckedOutCertificates]![BeginCertNolbl] AS Expr1,
[CheckedOutCertificates].[Inspector], [CheckedOutCertificates].[TypeOfCert],
[CheckedOutCertificates].[DateCheckedOut],
[CheckedOutCertificates].[BeginningInitial]
FROM Num, CheckedOutCertificates
WHERE
((([N]+[Forms]![frmCheckedOutCertificates]![BeginCertNolbl])<=[Forms]![frmCheckedOutCertificates]![EndCertNolbl])
And
(([CheckedOutCertificates].[Inspector])=[Forms]![frmCheckedOutCertificates]![cboInspector])
And
(([CheckedOutCertificates].[TypeOfCert])=[Forms]![frmCheckedOutCertificates]![cboTypeofCert])
And
(([CheckedOutCertificates].[DateCheckedOut])=[Forms]![frmCheckedOutCertificates]![DateCheckedOutlbl])
And
(([CheckedOutCertificates].[BeginningInitial])=[Forms]![frmCheckedOutCertificates]![BeginningInitiallbl]))
ORDER BY [N]+[Forms]![frmCheckedOutCertificates]![BeginCertNolbl];
WHERE ,,IIF [EndCertNolbl] is Null then I want only the [BeginCertNolbl]
appended. If [EndCertNolbl] is populated or Not Null than the following
code is correct...Thanks...Randy
INSERT INTO CheckedOutCertsAllNumbers ( CertNo, Inspector, TypeOfCert,
DateCheckedOut, BeginingCertInitial )
SELECT [N]+[Forms]![frmCheckedOutCertificates]![BeginCertNolbl] AS Expr1,
[CheckedOutCertificates].[Inspector], [CheckedOutCertificates].[TypeOfCert],
[CheckedOutCertificates].[DateCheckedOut],
[CheckedOutCertificates].[BeginningInitial]
FROM Num, CheckedOutCertificates
WHERE
((([N]+[Forms]![frmCheckedOutCertificates]![BeginCertNolbl])<=[Forms]![frmCheckedOutCertificates]![EndCertNolbl])
And
(([CheckedOutCertificates].[Inspector])=[Forms]![frmCheckedOutCertificates]![cboInspector])
And
(([CheckedOutCertificates].[TypeOfCert])=[Forms]![frmCheckedOutCertificates]![cboTypeofCert])
And
(([CheckedOutCertificates].[DateCheckedOut])=[Forms]![frmCheckedOutCertificates]![DateCheckedOutlbl])
And
(([CheckedOutCertificates].[BeginningInitial])=[Forms]![frmCheckedOutCertificates]![BeginningInitiallbl]))
ORDER BY [N]+[Forms]![frmCheckedOutCertificates]![BeginCertNolbl];