"Rick Brandt" <ri*********@hotmail.com> wrote in
news:b%******************@newssvr11.news.prodigy.c om:
MLH wrote: Here's a blurb cut from A97 HELP on BOF/EOF:
When you open a Recordset object that contains at least one
record, the first record is the current record and the BOF and
EOF properties are False; they remain False until you move beyond
the beginning or end of the Recordset object by using the
MovePrevious or MoveNext method, respectively.
From that HELP blurb, it would seem that the .MoveFirst in the
lines below is simply not needed. Would you agree? Am I
incorrect?
Set rstRRs = .OpenRecordset(dbOpenSnapshot)
With rstRRs
If .BOF = True Then GoTo NoRecs
.MoveFirst
Do Until rstRRs.EOF
If Int(Now()) - !DateSigned < WaitTime Then GottaWait = True
...
I would like to take the .MoveFirst out if it is not needed.
I've never used MoveFirst in a situation like that. You can get
rid of it.
I never use BOF/EOF to test for an empty recordset, but instead use
RecordCount = 0 (one test is more efficient than two).
But I always explicitly .MoveFirst simply because I don't like
depending on something happening over which I have no control. It
can't possibly be a performance problem since it's only going to
happen once per recordset, so I don't see the issue with doing
something explicitly that may be slightly redundant.
I simply don't like assuming that things will work the way they are
supposed in all situations.
--
David W. Fenton
http://www.dfenton.com/
usenet at dfenton dot com
http://www.dfenton.com/DFA/