What database are you using, msaccess, sql, mysql?
What connection are you using, data control or ADO?
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
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
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
Conn.Open = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\YourDatabaseName.MDB;Persist Security Info=False"
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
What do you mean with "highlighted record"? Where is it highlighted?
The code above will edit an existing record that you have chosen.
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
I also do not understand your picture, what is it suppose to show?
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
What is the code under this (below)?
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
Your code is porfect. Reference the ms active x data objects.:)
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
Do you have a control named txtName on your form?
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
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
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20