Missing Argrument

A

Anthony Viscomi

I have the following:

Set dbCurr = CurrentDb()
SysCmd acSysCmdInitMeter, "Working on CCE Template Updates"
lngCount = 0

For Each qryCurr In dbCurr.QueryDefs
lngCount = lngCount + 1
SysCmd acSysCmdUpdateMeter, lngCount

With qryCurr

If Right$(.Name, 4) = "_XLS" Then
.Execute dbFailOnError
clsRidesPBar.IncOne
End If

End With
Next qryCurr
SysCmd acSysCmdClearStatus

I seemto be missing an argrument in the SysCmd acSysCmdInitMeter, "Working
on CCE Template Updates" line.

If I place a value at the end, the script will run but the Progress Bar
starts at 100% and stays like that for the duration of the loop.

Any ideas?

Thanks,
Anthony
 
D

Dirk Goldgar

Anthony Viscomi said:
I have the following:

Set dbCurr = CurrentDb()
SysCmd acSysCmdInitMeter, "Working on CCE Template Updates"
lngCount = 0

For Each qryCurr In dbCurr.QueryDefs
lngCount = lngCount + 1
SysCmd acSysCmdUpdateMeter, lngCount

With qryCurr

If Right$(.Name, 4) = "_XLS" Then
.Execute dbFailOnError
clsRidesPBar.IncOne
End If

End With
Next qryCurr
SysCmd acSysCmdClearStatus

I seemto be missing an argrument in the SysCmd acSysCmdInitMeter,
"Working on CCE Template Updates" line.

If I place a value at the end, the script will run but the Progress
Bar starts at 100% and stays like that for the duration of the loop.

Any ideas?

You're right, you need an extra argument when you call SysCmd with
acSysCmdInitMeter. The third argument should be specified to tell the
progress meter what the maximum value will be for whatever process the
meter will be reporting. That is, what is the value corresponding to a
"100%" progress meter? Then when you call SysCmd acSysCmdUpdateMeter as
your process is progressing, you pass a progress value that is relative
to the value passed when you initialized the meter.
 
D

Douglas J. Steele

You need to provide a third parameter when you use acSysCmdInitMeter, one
that represents the total number possible (so that it knows how much to
increment the progress bar with each change through acSysCmdUpdateMeter.

By the way, if you feel you need to post to more than one group (HINT: it's
seldom necessary), please have the courtesy to cross-post (send the one
message to all groups at once), rather than multi-post (send individual
messages to each group). In this way, all responses to your post will be
available together, regardless of what group the responder was in, and the
rest of us won't have to read your post multiple times. (It also uses fewer
server resources)

I see you're using Outlook Express. Click the "Newsgroups:" label to the
left of the box containing the name of the current newsgroup. That will open
a dialog that will let you add additional newsgroups to your post.

Note that it's generally consider to be A Bad Thing to cross-post to more
than about 2 or 3 newsgroups. (In fact, at
http://www.microsoft.com/presspass/features/2001/Mar01/Mar27pmvp.asp
Microsoft suggests that "One group will suffice")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top