Database programming with MS Access
Posted on 2001-06-18
I haven't done much development with databases so I need some help.
I have two tables, I need to search one table for records with a certain string in the Type field and if I find a record with that string I need to delete the record. The code I have for this is as follows:
with tblContact do
SearchOptions := [loCaseinsensitive];
if Locate ('Type', 'Bradford', SearchOptions) then
I keep getting a message "tblContact: Cannot Perform this Operation on a Closed Dataset".
If I put a tblContact.Open statement in, I get the a message saying the table is already open.
Once I get this working, I then need to look in the registry for a certain value and then search my second table for records with this value in the Area field and add those records to the first table. I was going to try using the BatchMove component with the batAppend, but I believe that would append the entire second table.
Any help would be appreciated :)