View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected][_2_] gimme_this_gimme_that@yahoo.com[_2_] is offline
external usenet poster
 
Posts: 236
Default Is this Possible

Well, *IF* it is possible the only way you could do it would be to
swap out the update statement with a select statement.

I know it sounds strange if you're not using Access - but with Access
you can update with a select statement.

The first step is to find out if you can set up a trigger to assign
the primary key within Access.

It probably isn't possible to do it - so you might have to add a
select statement that inserts the data just before the Loop statement.

What you're doing sort a *wrong* approach.

You're using Excel as a database instead of as a static database or as
a spreadsheet.

With this approach you risk loading the data multiple times and
corrupting the data.

I recommend doing all inserts and updates within Access unless you are
fully up to speed on ADO and you've got the time to merge rows into
your database instead of just inserting rows.