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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add record to table

Status
Not open for further replies.

Bullsandbears123

Technical User
Feb 12, 2003
291
US
I have a table "tblcontacts". I would like to add a record and insert values into it with out using a form just VB. It this possible.

tblcontacts:
[name]is text [address]is text [phone]is number


Is there a command I can use in insert value into the recordset.
for example :
docmd.addrecord(john,1234street,5555555555)

or something like this.

Thanks
 
sql="Insert values("1","2") into Table1(Col1,Col2)"
DB.Execute sql
or
DB.Execute "Insert values("1","2") into Table1(Col1,Col2)"

TIA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top