I posted a question before (to too many groups) and this time I am
sending to this group only. I have a quick script as seen below, the
file_list table has a unique field called file_name.
The problem I am having is that if no unique items exist, this will
insert into the table fine. But if a unique item does exist it will not
insert as it should. My problem is that I can not get access to return
any kind of error. This is very frustrating as I have scowered the net
for what is a seemingly easy thing to do.
What am I doing wrong here? Is there a better way to do this? My real
program is a fairly big sql insert script repeated many times and it is
failing for one reason or another. But I cannot find out why because I
cannot print the errors that are returned.
db = CurrentDb()
CurrentDb.Execute "insert into file_list (file_name) VALUES (test.txt)"
MsgBox ("good")
Debug.Print Err.Description
Debug.Print Err.Number