Re: Empty "If Me.Recordset Is Nothing Then" clause causes runtime error 3021 (Access 2003)
From: david epsom dot com dot au (david_at_epsomdotcomdotau)
Date: 08/24/04
- Next message: Manuel: "Edit PivotTable Form"
- Previous message: Steve Schapel: "Re: vertical ordering of continuous form"
- In reply to: Boris: "Re: Empty "If Me.Recordset Is Nothing Then" clause causes runtime error 3021 (Access 2003)"
- Next in thread: Boris: "Re: Empty "If Me.Recordset Is Nothing Then" clause causes runtime error 3021 (Access 2003)"
- Reply: Boris: "Re: Empty "If Me.Recordset Is Nothing Then" clause causes runtime error 3021 (Access 2003)"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 24 Aug 2004 19:14:45 +1000
DAO360 help: "If you delete the last remaining record in the Recordset
object, the BOF and EOF properties may remain False until you attempt to
reposition the current record."
I have some unresolved issues with requery/BOF/EOF, but in your case doesn't
it look more like a latency problem between your form recordset and your
project connection, rather than a failure of requery/BOF/EOF ???
(david)
"Boris" <boris@gtemail.net> wrote in message
news:Oo5P4vaiEHA.3428@TK2MSFTNGP11.phx.gbl...
> david epsom dot com dot au wrote:
> > BOF and EOF are set by a MOVE command. If you do not do a MOVE,
> > then BOF and EOF will not be set. It is quite easy to get a
> > recordset with no records, but BOF and EOF both false: just delete
> > the records from the recordset so that it is empty. (This is,
> > or was, documented in the help file, and last I checked remains
> > true in all versions of Access).
>
> That is what the test database does: Deleting all records from the
> recordset. And my proposed fix was to call MoveFirst on the empty
Recordset
> to update BOF and EOF to true.
>
> Searching the help files and MSDN I only found the stuff about Requery
being
> equivalent to Close and Open and therefore concluded that BOF and EOF
should
> be set to true. Do you remember where you read about BOF and EOF should be
> false? I understand your point with Move actions. However in my opinion
the
> help files seem to contradict Access regarding Requery. It would be nice
to
> hear the opinion of someone from the Microsoft Access team.
>
> Boris
>
> > [...]
>
>
- Next message: Manuel: "Edit PivotTable Form"
- Previous message: Steve Schapel: "Re: vertical ordering of continuous form"
- In reply to: Boris: "Re: Empty "If Me.Recordset Is Nothing Then" clause causes runtime error 3021 (Access 2003)"
- Next in thread: Boris: "Re: Empty "If Me.Recordset Is Nothing Then" clause causes runtime error 3021 (Access 2003)"
- Reply: Boris: "Re: Empty "If Me.Recordset Is Nothing Then" clause causes runtime error 3021 (Access 2003)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|