Hi,
Using Access 2003.
I am trying to delete records from one table/query
("qryHistoryPer sonIDs") if they don't exist in another table
("qryDonations" ). But the SQL syntax I came up with is taking forever
or locking up Access 2003.
What am I doing wrong?
The code is below. dFromDate_pw and dToDate_pw are set to values of
date fields on a form. qryHistoryPerso nIDs contains one key field:
DoCmd.RunSQL "Delete * From qryHistoryPerso nIDs Where
qryHistoryPerso nIDs.personID Not In (Select qryDonations.pe rsonid From
qryDonations Where tblDonations.[DonationDate] Not Between #" &
dFromDate_pw & "# And #" & dToDate_pw & "# )"
I'd rather not manually read through the table as it has 4,000 records
and is growing.
Any ideas?
-pw
use paulwilliamson at spamcop dot net for e-mail
Using Access 2003.
I am trying to delete records from one table/query
("qryHistoryPer sonIDs") if they don't exist in another table
("qryDonations" ). But the SQL syntax I came up with is taking forever
or locking up Access 2003.
What am I doing wrong?
The code is below. dFromDate_pw and dToDate_pw are set to values of
date fields on a form. qryHistoryPerso nIDs contains one key field:
DoCmd.RunSQL "Delete * From qryHistoryPerso nIDs Where
qryHistoryPerso nIDs.personID Not In (Select qryDonations.pe rsonid From
qryDonations Where tblDonations.[DonationDate] Not Between #" &
dFromDate_pw & "# And #" & dToDate_pw & "# )"
I'd rather not manually read through the table as it has 4,000 records
and is growing.
Any ideas?
-pw
use paulwilliamson at spamcop dot net for e-mail
Comment