Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a criteria to append all records not in the current DB? 1

Status
Not open for further replies.

jay9333

IS-IT--Management
Dec 5, 2003
50
US
I'm working with two tables, one called the "log" table and one called the "data" table.

I have a command button set up to do an append querry. I want the append querry to append all the records from the log table that aren't already in the data table. Right now, I have to enter the same data in both tables. Basically, I want to stop having to re-enter data from the log table into the data table. I just want to click my button and have the "data" table be updated with all data from the "log" table that is new (but just leave the old).

Is there a criteria I can use for this in a filter or querry, or do I have to write a macro or something like that?
 
If you have an field indexed that does not allow duplicates, then doing a standard append will only copy the new records. If you do not have a unique field like this, then consider creating one from two are more of fields you have.
 
Thank you tledwards (and nice95gle),

I'm not sure I understand how to create a unique field from two or more fields. I do know that the tables I'm working with have multiple fields identified as primary keys. Basically, this DB has been thrown to me to 'fix', and the problem is the update I described above isn't working. Right now there is a filter for the log table and an append from that filter. For some reason the criteria for the filter is &quot;<=Now()-2&quot;.

I'll keep looking into it this &quot;indexing&quot; thing you referred to, and post any more questions I have. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top