Records being deleted

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a continuous form with its recordsource tied to one table, call it
Table1. However, I also have a Dlookup text box on the form that looks up
data from another table (call it Table2) based on the records returned from
the recordsource. When I delete a record via this form it appears to delete
not only the record in Table1 but also Table2 (which I do not want to
happen). I do not have any relationships explicity defined between these
tables although they do share a primary/foreign key. Do you have any insight
what might be going on? Is the DLookup function causing the record in Table2
to be deleted?
 
The Dlookup doesn't delete the records in table2.

I would check the following:
1. Check again if there is relationship between the two tables
2. Does the RecordSource of the form includes both tables, if it does then
remove table2 from it
3. Is there code in the form, that run a delete query or SQL, that remove
the record from table2
 
Thanks. At first the recordsource did include both tables and I recognized
that as the problem initially. However, after removing Table2 from the
recordsource and saving, it still would delete records from Table2. However,
this morning, after I shut down Access and restarted the database now it
works fine. I wonder if it held onto a "ghost" connection until I completely
shut down the database??

Oh well, all is good for now.
Thanks for your help.
Chace
 
Back
Top