(1) Dim RCount As Integer, i As Integer, MOrd As Integer
RCount = DCount("*", "Summary Month Query", "SIndex =" & [SIndex]) / 10
'database setup for 10 Yrs
Hrs_Calc (RCount)
i = 1
Month_subform.SetFocus
DoCmd.GoToRecord , , acFirst ... does this go to the first record in a
table?
For i = 1 To (Date - 1)
DoCmd.GoToRecord , , acNext
Next i
VacTotal = (Vacation * (Date - 1)) + Bank_Hrs_CO + summBHrs 'til end of
last month
In particular I don't understand the "Rcount = Dcount ... " statement .. It
looks like it is running a query a no of times, but I don't understand what
"*" means in the statement.
My assumeption is that then the Sub routine Hrs_calc is performed the no of
times reflected by the value of Rcunt?
(2) where can I look up the meaning of an error code eg 2950
Your help would be most appreciate.
Thanks
Ba arc
(1) RCount = DCount("*", "Summary Month Query", "SIndex =" & [SIndex]) / 10
DCount returns number of records in query Summary Month Query for certain
SIndex
(2) You can lookup here:
http://accessblog.net/2008/02/microsoft-access-error-number-and-error.html
http://www.dbforums.com/microsoft-access/1279658-list-access-error-codes.html
http://www.e-tech.ca/001-AllAccessErrors0.ASP
--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
"Abay" <ab...@aol.com> wrote in message
news:OJ5fRz7e...@TK2MSFTNGP02.phx.gbl...
Also to know what the Rcount statement means ... but I am still a little
puzzled as to what the "*" part of it means? Does it mean "return the
results of the query as a record count?
Many thanks again
Ba arc
"Alex Dybenko" <ale...@PLEASE.cemi.NO.rssi.SPAM.ru> wrote in message
news:Oc9OpX8e...@TK2MSFTNGP06.phx.gbl...
Using the wildcard is more efficient in a DCount than selecting a particular
field in the query, especially if the field selected is not indexed.
The RCount variable makes life easier...he doesn't need to rewrite the
entire DCount function each time he needs to use it's value, he uses the
variable which contains the value (number) he wants to refer to or use in
further calculations.
Jim
"Abay" <ab...@aol.com> wrote in message
news:ur3Kx8Af...@TK2MSFTNGP05.phx.gbl...
Abay
"Jim Evans" <j...@microsoftdiscussions.com> wrote in message
news:%23fFO5XB...@TK2MSFTNGP05.phx.gbl...