Click to See Complete Forum and Search --> : Append records
smh
Oct 30th, 2000, 06:58 PM
Try looking at the code here:
http://www.vb-world.net/articles/database3/index4.html
It is code to create a new database, but it will give you an idea of how to go about what you need to do. There's a good example of the 'append' with DAO.
smh
paulw
Oct 31st, 2000, 08:11 AM
Append and AddNew or not similar methods - Append is to add an object to a collection (e.g. fields to a table definition) and AddNew is to add records.
You definitely want AddNew - it will only error if the record already exists with the same key. In this case you would not want to add the record and you should apply some error handling.
If the table is not keyed, then the record will be added without error.
Cheers,
Paul.
Blitz
Oct 31st, 2000, 10:42 AM
What is the error that prompts you? Is it something regarding duplicate values/key values?
If so you're trying to add something that's already been added to the database. Either you change the Unique key value in the database or filter out the duplicate records.
Setting up a error handler in this case will be very useful like wat paulw has suggested :)
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.