Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not able to add rows through ADO

Status
Not open for further replies.

slugo

Programmer
Dec 16, 2001
15
US
Hi,

I have a connection to my access database, through ado. I'm trying to add a row to a small table, that includes two fields (MakeName and MakeCode). This is my code so far:

Set RS = DataEnvironment1.rsVehicle_Makes

RS.Open
' Adds a row with the new make
RS.AddNew [MakeName, MakeCode], [txtMake.Text, txtCode.Text]

It says it can't find project or library. Don't know what I'm doing wrong. So any insight would be nice. I'm also grabbing the values out of two text boxes. Thanks in Advance.
 
Make sure you have the Advanced properties of the connection to be allow read/write and command properties lock type to be optimistic.
Dont know if this is your problem (if you can display the full error message in a reply)

Cheers!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top