how to add a new record to database using textbox

Hello friends,

I connected some textbox controls to a adodc , I want to add new records using those textbox controls.

Thank you very much,
Azadeh
aa_azadehAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
TylerTheWimpConnect With a Mentor Commented:
'txt1 is a textbox on your form that links to field "a" in your table
'txt2 is a textbox on your form that links to field "b" in your table
'rs is a module level or application level recordset that has an active connection to your table

private sub addRecord()

  rs.addnew
  rs("a").value = txt1.text
  rs("b").value = txt2.text
  rs.update

end sub
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.