here's the code: it deals with processing and updated rows in a table called "my_table", and updated "street".
**********************************************************
Option Compare Database
Option Explicit
Public Function sibbling1()
Dim rschild As Recordset
Dim streetx As String
Debug.Print "=== Start of subroutine ==="
Set rschild = CurrentDb.OpenRecordset("my_table")
rschild.MoveFirst
Do Until rschild.EOF
rschild.Edit
streetx = rschild!street
If streetx = "xxxx" Then
streetx = "1501 washington street, east"
rschild!street = streetx
rschild.Update
End If
rschild.MoveNext
Loop
rschild.Close
Debug.Print "=== end of subroutine ==="
msgbox("records were updated")
End Function
this code works in one database, but when i copy it to another database, it doesn't work. can anyone help?
**********************************************************
Option Compare Database
Option Explicit
Public Function sibbling1()
Dim rschild As Recordset
Dim streetx As String
Debug.Print "=== Start of subroutine ==="
Set rschild = CurrentDb.OpenRecordset("my_table")
rschild.MoveFirst
Do Until rschild.EOF
rschild.Edit
streetx = rschild!street
If streetx = "xxxx" Then
streetx = "1501 washington street, east"
rschild!street = streetx
rschild.Update
End If
rschild.MoveNext
Loop
rschild.Close
Debug.Print "=== end of subroutine ==="
msgbox("records were updated")
End Function
this code works in one database, but when i copy it to another database, it doesn't work. can anyone help?