T
The.Daryl.Lu
Hey,
I'm trying to program a few queries in MS Access using VB. For my
insert query, I'm importing an Excel spreadsheet using the
'transferspreadsheet' function of VB. Now, if I try to insert two
rows with duplicate primary keys, the program only inserts one of the
rows. How do I show a message box that alerts me that ONE row was not
inserted? So, this message box would be dynamic in the sense that it
would ONLY appear when rows are NOT inserted and when it does appear,
it would state the number of rows that were not inserted.
As a bonus question, is it possible to state after the information box
perhaps a subform that would show what rows did not insert and why
(I'm guessing in another field in a table of sorts.
Much Appreciated,
Daryl
I'm trying to program a few queries in MS Access using VB. For my
insert query, I'm importing an Excel spreadsheet using the
'transferspreadsheet' function of VB. Now, if I try to insert two
rows with duplicate primary keys, the program only inserts one of the
rows. How do I show a message box that alerts me that ONE row was not
inserted? So, this message box would be dynamic in the sense that it
would ONLY appear when rows are NOT inserted and when it does appear,
it would state the number of rows that were not inserted.
As a bonus question, is it possible to state after the information box
perhaps a subform that would show what rows did not insert and why
(I'm guessing in another field in a table of sorts.
Much Appreciated,
Daryl