A
alidabiri
here's my code:
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
the problem is this works in one database. i copied the code and put
it in this database that contains "my_table" and it doesn't work.
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
the problem is this works in one database. i copied the code and put
it in this database that contains "my_table" and it doesn't work.