R
Rod
Hello,
I and doing an archive and would like to make a simple change but can't
figure it out. Here is the code:
'Step 1: Initialize database object inside a transaction.
Set ws = DBEngine(0)
ws.BeginTrans
bInTrans = True
Set db = ws(0)
'Step 2: Execute the append.
strSql = "INSERT INTO tblCandidatesArchive "
strSql = strSql & " IN 'J:\Bak\PFS\Recruiting\MyCandidateArchiveTable.mdb' "
strSql = strSql & " SELECT * FROM tblCandidates"
strSql = strSql & " WHERE Archive <= #" & Date & "#;"
db.Execute strSql ', dbFailOnError
'Step 3: Execute the delete.
strSql = "DELETE FROM tblCandidates"
strSql = strSql & " WHERE Archive <= #" & Date & "#;"
db.Execute strSql ', dbFailOnError
I would like to change the WHERE statements to not only check the date but
if CALL_RESULTS = Skipped then archive that record as well.
Thanks.
I and doing an archive and would like to make a simple change but can't
figure it out. Here is the code:
'Step 1: Initialize database object inside a transaction.
Set ws = DBEngine(0)
ws.BeginTrans
bInTrans = True
Set db = ws(0)
'Step 2: Execute the append.
strSql = "INSERT INTO tblCandidatesArchive "
strSql = strSql & " IN 'J:\Bak\PFS\Recruiting\MyCandidateArchiveTable.mdb' "
strSql = strSql & " SELECT * FROM tblCandidates"
strSql = strSql & " WHERE Archive <= #" & Date & "#;"
db.Execute strSql ', dbFailOnError
'Step 3: Execute the delete.
strSql = "DELETE FROM tblCandidates"
strSql = strSql & " WHERE Archive <= #" & Date & "#;"
db.Execute strSql ', dbFailOnError
I would like to change the WHERE statements to not only check the date but
if CALL_RESULTS = Skipped then archive that record as well.
Thanks.