Mar 8, 2001 #1 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
Mar 8, 2001 #2 savok Technical User Joined Jan 11, 2001 Messages 303 Location AT 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 Upvote 0 Downvote
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
Mar 8, 2001 Thread starter #3 Guest_imported New member Joined Jan 1, 1970 Messages 0 Thanks Savok Worked a treat. Upvote 0 Downvote