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

Add via command 1

Status
Not open for further replies.

naturalsn

Technical User
Apr 26, 2007
68
GB
Good Day

I was hoping someone might be capable of assisting.

I currently have a dropdown call "Addskills" on a Form wich has 2 Coloms from a Table in My DB.

One ID & Another The Description of The ID.

I am hoping to allow the user when selecting from the AddSkills Dropdown, Select An "Add" command which will Add the the REcord currently visible in the dropdown + an Additional REcord on my form into a table called tblePersonellskills. Which in return will update information on a subform.

I was hoping for advise on the possiblity to use the active record in the dropdown + a field in my form to append to a current table.

I am currenctly using

Create new ADODB REcordset, but just ending up with errors. and changed the way i have done so many times but no luck.
Any advise would be greatly appreciated.

Regards
SN
 
The easiest thing to do is to use an update query.

Code:
strSQL="INSERT INTO tblTable (Field1, Field2) VALUES (" & Me.cboCombo & ",'" & Me.txtText & "')"
CurrentDB.Execute strSQL, dbFailOnError

Note that text fields need single quote delimiters and dates need hash signs (#).

It is usually easier to use DAO than ADO with Access, you just need to add a reference to the Microsoft DAO x.x Object Library.
 
Brilliant Thank you very much for the advise. It is working perfectly..

Thank you so much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top