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

Assigning Values from textbox on Form to recordset

Status
Not open for further replies.

Guest_imported

New member
Joined
Jan 1, 1970
Messages
0
How do you assign values from a textbox on a form to a recordset.

Using VB6 / Access2000, ADO

Thanks
 
you open a connection to the database and then insert or update it with the info from the textboxes depending on what you want to do

Dim objConn As New ADODB.Connection
Dim objComm As New ADODB.Command
objConn.ConnectionString = "DSN=*;UID=*;SERVER=*;PWD=*"
objConn.Open

objComm.ActiveConnection = objConn
objComm.CommandText = "Update table set field= '" & txt & '"
objComm.CommandType = adCmdText
objComm.Execute
objConn.Close
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top