Re: do i NEED to use .movefirst immediately upon opening a recordset?
- From: Tom van Stiphout <no.spam.tom7744@xxxxxxx>
- Date: Sat, 20 May 2006 07:51:59 -0700
On Sat, 20 May 2006 08:30:28 -0400, MLH <CRCI@xxxxxxxxxxxxxx> wrote:
Since after opening a recordset the record pointer is already at the
first record (if at least 1 record), it is a no-op. As Bob points
out, it is even counter-productive in some situations.
-Tom.
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 linesbelow 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.
.
- References:
- Prev by Date: Is setting to Nothing really necessary if procedure is about to end?
- Next by Date: Re: Is setting to Nothing really necessary if procedure is about to end?
- Previous by thread: Re: do i NEED to use .movefirst immediately upon opening a recordset?
- Next by thread: Re: do i NEED to use .movefirst immediately upon opening a recordset?
- Index(es):
Relevant Pages
|