If I read this correctly, you have opened the recordset where the id = 2. According to you, the name field is empty??? thats why nothing shows in text1.text. What seems to be the problem then?
To check if it IS empty, you can do teh following...
If rs!name = vbnullstring Then
msgbox "No Value Here..."
Else
text1.text = rs!name
End If
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
do the following...
...
....
set rs = new adodb.recordset
rs.open ("SELECT * FROM table1")
rs.AddNew
rs!name = text1.text
rs.update
If you want to save it to that specific record, do this...
...
....
set rs = new adodb.recordset
rs.open ("SELECT * FROM table1 WHERE id='2'")
rs!name = text1.text
rs.update
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
Question Answered as of 5 Months Ago by
AndreRet Almost :)
dim cn as adodb.connection ''removed new...
set cn = new adodb.connection
cn.execute "UPDATE Table1 SET T_city = '" & text1.text & "' where ID = '2'"
cn.close
Should work just fine.
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20