Records being deleted

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?
 
G

Guest

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top