Microsoft
Software
Hardware
Network
Question : db.Execute result
I'm using the following to insert a record in a table:
1: 2: 3:
sql="INSERT INTO table (Order,Quantity) VALUES ('test',10) db.execute (sql)
How can I find out the db.execute actually added a new record or not.
If the
order
field's
Index
is set to
Yes(No Duplicate)
it will fail to insert a new record if
Order
is duplicated
thanks for any kind of help
Answer : db.Execute result
Dim lRecs As Long
sql="INSERT INTO table (Order,Quantity) VALUES ('test',10)
With CurrentDb
.execute (sql)
lRecs = .RecordsAffected
End With
If lRecs>0 then ' it happened
mx
Random Solutions
Unmerge cell and split into rows
.net create thumbnail for pdf
WAMP will not restart on WINDOWS 2003 Server
Replace pc4200 with pc6400
How to delete all relationships between tables before deleting tables within Access using VBA?
How do I block netbios traffic using Windows Server 2008 firewall
calculate timespan after midnight
My PC "freezes", no respons whatsoever.
Clean an excel file before importing in access
Best Location to place site on dedicated server