What database are you using, msaccess, sql, mysql?
What connection are you using, data control or ADO?
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
Dim conn as ADODB.Connection
Dim Rs As ADODB.Recordset
Set conn = new ADODB.Connection
Set Rs = New ADODB.Recordset
'Do your connection to access code here
Rs.Open "SELECT * FROM MyTable", conn, adOpenStatic, adLockOptimistic
Rs!Fieldname1 = Text1.Text
Rs.Update
And that is it...:)
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
Conn.Open = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\YourDatabaseName.MDB;Persist Security Info=False"
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
What do you mean with "highlighted record"? Where is it highlighted?
The code above will edit an existing record that you have chosen.
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
I also do not understand your picture, what is it suppose to show?
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
What is the code under this (below)?
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
Your code is porfect. Reference the ms active x data objects.:)
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
Do you have a control named txtName on your form?
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
Then your problem lies with the field name CustomerName. Is that spelled correctly. It is not the recordset, that was declared etc. Is your open call correct, in other words the table name List exists?
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350