GregoryWest
Registered User.
- Local time
- Today, 13:36
- Joined
- Apr 13, 2014
- Messages
- 161
I have to run through a large (read several hundred thousand records) import file. What I was trying to do is just show the user a progress bar, so they know something is happening, while they wait. I am using this code:
Set rs_datain = DBEngine(0)(0).OpenRecordset(strsqlin)
rs_datain.MoveLast
xx = SysCmd(acSysCmdInitMeter, "working...", rs_datain.RecordCount)
MsgBox rs_datain.RecordCount
rs_datain.MoveFirst
curr_rec = 0
Do While Not rs_datain.EOF
tempstr = rs_datain!InputText
rectype = Mid((rs_datain!InputText), 14, 2)
curr_rec = curr_rec + 1
xx = SysCmd(acSysCmdUpdateMeter, curr_rec)
Select Case rectype
But when it get to the xx = SysCmd(acSysCmdUpdateMeter, curr_rec) command I get a 7952 'You made an illegal function call' error. What am I doing wrong???
Set rs_datain = DBEngine(0)(0).OpenRecordset(strsqlin)
rs_datain.MoveLast
xx = SysCmd(acSysCmdInitMeter, "working...", rs_datain.RecordCount)
MsgBox rs_datain.RecordCount
rs_datain.MoveFirst
curr_rec = 0
Do While Not rs_datain.EOF
tempstr = rs_datain!InputText
rectype = Mid((rs_datain!InputText), 14, 2)
curr_rec = curr_rec + 1
xx = SysCmd(acSysCmdUpdateMeter, curr_rec)
Select Case rectype
But when it get to the xx = SysCmd(acSysCmdUpdateMeter, curr_rec) command I get a 7952 'You made an illegal function call' error. What am I doing wrong???