Help Please!!
Can you see what is WRONG with this code??
dim arrSchedules() as string
dim intx,inty as integer
(also have databases & recordsets declared)
'fill Schedules array
Set rsDailyLabor = dbPayroll.OpenRecordset("Select * from Schedules", dbOpenDynaset)
rsDailyLabor.MoveLast
intX = rsDailyLabor.RecordCount '(there are 14 recs)
intY = rsDailyLabor.Fields.Count '(there are 3 fields)
ReDim arrSchedules(intX, intY) 'SHOULD BE 14,3
rsDailyLabor.MoveFirst
intX = 0
While Not rsDailyLabor.EOF
arrSchedules(intX, 0) = CStr(rsDailyLabor.Fields("Key".Value)
arrSchedules(intX, 1) = CStr(rsDailyLabor.Fields("InTime".Value)
arrPayRules(intX, 2) = CStr(rsDailyLabor.Fields("OutTime".Value) '***ERRORS HERE AT (5,2)
intX = intX + 1
rsDailyLabor.MoveNext
Wend
Set rsDailyLabor = Nothing
ANY HELP WOULD BE APPRECIATED!!
Can you see what is WRONG with this code??
dim arrSchedules() as string
dim intx,inty as integer
(also have databases & recordsets declared)
'fill Schedules array
Set rsDailyLabor = dbPayroll.OpenRecordset("Select * from Schedules", dbOpenDynaset)
rsDailyLabor.MoveLast
intX = rsDailyLabor.RecordCount '(there are 14 recs)
intY = rsDailyLabor.Fields.Count '(there are 3 fields)
ReDim arrSchedules(intX, intY) 'SHOULD BE 14,3
rsDailyLabor.MoveFirst
intX = 0
While Not rsDailyLabor.EOF
arrSchedules(intX, 0) = CStr(rsDailyLabor.Fields("Key".Value)
arrSchedules(intX, 1) = CStr(rsDailyLabor.Fields("InTime".Value)
arrPayRules(intX, 2) = CStr(rsDailyLabor.Fields("OutTime".Value) '***ERRORS HERE AT (5,2)
intX = intX + 1
rsDailyLabor.MoveNext
Wend
Set rsDailyLabor = Nothing
ANY HELP WOULD BE APPRECIATED!!