11-07-08, 13:25 #1Registered User
- Join Date
- Nov 2008
Unanswered: Searching & Replacing Field values
I am using VB with Ms-Access 2003
I need to replace my recordset values.
My rcordset named "check" has no1 fields which contain datas like this 11-2, 5-4, 5, 6.
Here i want to replace 11-2 by 11/2 and also 5 by 5/1 like that for all the datas
I used the below coding but not working, Pls help me in this coding.
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
Private Sub Command1_Click()
rs.Open "check1", db, 3, 2 ' I opened recordset
currentdb.Execute "update check1 set rs.Fields(0) = Replace(rs.Fields(0), " - ", " / ")" ' here i tried to change the values
Private Sub Form_Load()
db.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Bharani\Desktop\New Folder (2)\check.mdb;Persist Security Info=False"
Thank you sir.
11-07-08, 13:29 #2Registered User
- Join Date
- Feb 2004
there is already a thread for this
Since you were working with Pootleflump, you should probably wait for his answer when he logs back in.You know, I'm sick of following my dreams, man. I'm just going to ask where they're going and hook up with 'em later