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
Create a brush
access send email to a particular address
Why is my VB script limiting results to 1500 ?
Need to make a popup show 5 minutes after the users exit
How purge records from access database
Pivot statement with Dynamic SQL and totals columns
VBScript WLAN MAC Address
Windows 7 Password Protection Issue
Outlook 2003 - How Do I Set MS Exchange Server...
my pdc crashed; unable to logon to 2003 servers; can you explain if this is because pdc is down