greymonkey
Technical User
hi there,
i have an append query:
INSERT INTO TblDayChildLink ( ChildRef, [Date], Book1, Book2, Book3 )
SELECT QryAddRegChild.ChildRefNum, #9/29/2003# AS Expr1, TblChildInfo.MonBreakBook AS Expr2, TblChildInfo.MonAfterBook AS Expr3, TblChildInfo.MonOtherInfo AS Expr4
FROM QryAddRegChild;
running off a select query:
SELECT TblChildInfo.ChildRefNum, TblChildInfo.[First Name], TblChildInfo.[Last Name], TblChildInfo.MonBreakBook, TblChildInfo.MonAfterBook, TblChildInfo.MonOtherInfo
FROM TblChildInfo
WHERE (((IIf([monbreakbook] Is Not Null Or [monotherinfo] Is Not Null Or [monafterbook] Is Not Null,1,0))=1));
the problem i have is that i only need to insert the data if there is not allready a row with the childRef AND Date in the table.
any ideas,
i have an append query:
INSERT INTO TblDayChildLink ( ChildRef, [Date], Book1, Book2, Book3 )
SELECT QryAddRegChild.ChildRefNum, #9/29/2003# AS Expr1, TblChildInfo.MonBreakBook AS Expr2, TblChildInfo.MonAfterBook AS Expr3, TblChildInfo.MonOtherInfo AS Expr4
FROM QryAddRegChild;
running off a select query:
SELECT TblChildInfo.ChildRefNum, TblChildInfo.[First Name], TblChildInfo.[Last Name], TblChildInfo.MonBreakBook, TblChildInfo.MonAfterBook, TblChildInfo.MonOtherInfo
FROM TblChildInfo
WHERE (((IIf([monbreakbook] Is Not Null Or [monotherinfo] Is Not Null Or [monafterbook] Is Not Null,1,0))=1));
the problem i have is that i only need to insert the data if there is not allready a row with the childRef AND Date in the table.
any ideas,