Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

code works in one db but when copied, it's not working

Status
Not open for further replies.

alidabiri

Programmer
Sep 30, 2005
300
0
0
US
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top