P
Paul S Panoff
I am getting a run time error of object type mismatch when using the
following code in a module.
The "MapExt" query is an existing query in the database that runs fine
outside of the module. I need to update groups of records with a value
that resets at the next group.
Public Sub UpdatePersonValues()
' use to update the map-Prsn field with unique sequential
values that
' represent the color codes for the routes within each cycle
Dim rsQ As Recordset
Dim svOfc As String, svCyc As Integer, svRte As String
Dim colorCnt As Integer
Set rsQ = CurrentDb.OpenRecordset("MapExt") <-- run time
error here
'begin loop to go thru all records from query
With rsQ
svOfc = .Fields(0) 'save initial office value
svCyc = .Fields(1) 'save init cycle
following code in a module.
The "MapExt" query is an existing query in the database that runs fine
outside of the module. I need to update groups of records with a value
that resets at the next group.
Public Sub UpdatePersonValues()
' use to update the map-Prsn field with unique sequential
values that
' represent the color codes for the routes within each cycle
Dim rsQ As Recordset
Dim svOfc As String, svCyc As Integer, svRte As String
Dim colorCnt As Integer
Set rsQ = CurrentDb.OpenRecordset("MapExt") <-- run time
error here
'begin loop to go thru all records from query
With rsQ
svOfc = .Fields(0) 'save initial office value
svCyc = .Fields(1) 'save init cycle