Here is the code I am using to renumber all the records in a table from 1 to the number of records, and it is working fine.
Set WS = DBEngine.Workspaces(0)
Set MyDb = WS.OpenDatabase("C:\Program Files\DailyABS\WindJob.mdb")
Set MySet = MyDb.OpenRecordset("ABS_Daily")
Auto = 1
MySet.MoveFirst
Do Until MySet.EOF
MySet.Edit
MySet("Auto") = Auto
MySet.Update
Auto = Auto + 1
MySet.MoveNext
Loop
MySet.Close: MyDb.Close: WS.Close
I would now like to modify this to only renumber the records that meet a certian condition.
The condition would be: Where Wound = 0
But I can't find the appropriate Select statement to make this If condition happen in MSAccess 2000.
Thanks for any input to my problem.
Set WS = DBEngine.Workspaces(0)
Set MyDb = WS.OpenDatabase("C:\Program Files\DailyABS\WindJob.mdb")
Set MySet = MyDb.OpenRecordset("ABS_Daily")
Auto = 1
MySet.MoveFirst
Do Until MySet.EOF
MySet.Edit
MySet("Auto") = Auto
MySet.Update
Auto = Auto + 1
MySet.MoveNext
Loop
MySet.Close: MyDb.Close: WS.Close
I would now like to modify this to only renumber the records that meet a certian condition.
The condition would be: Where Wound = 0
But I can't find the appropriate Select statement to make this If condition happen in MSAccess 2000.
Thanks for any input to my problem.