Solved

how to add a new record to database using textbox

Posted on 2004-08-14
1
167 Views
Last Modified: 2010-05-02
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
0
Comment
Question by:aa_azadeh
1 Comment
 
LVL 2

Accepted Solution

by:
TylerTheWimp earned 125 total points
ID: 11801935
'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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now