Re: Empty "If Me.Recordset Is Nothing Then" clause causes runtime error 3021 (Access 2003)
From: Boris (boris_at_gtemail.net)
Date: 08/24/04
- Next message: Steve Schapel: "Re: Access shutdown"
- Previous message: Andrew C: "Re: List Box"
- In reply to: david epsom dot com dot au: "Re: Empty "If Me.Recordset Is Nothing Then" clause causes runtime error 3021 (Access 2003)"
- Next in thread: david epsom dot com dot au: "Re: Empty "If Me.Recordset Is Nothing Then" clause causes runtime error 3021 (Access 2003)"
- Reply: david epsom dot com dot au: "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 10:28:33 +0300
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: Steve Schapel: "Re: Access shutdown"
- Previous message: Andrew C: "Re: List Box"
- In reply to: david epsom dot com dot au: "Re: Empty "If Me.Recordset Is Nothing Then" clause causes runtime error 3021 (Access 2003)"
- Next in thread: david epsom dot com dot au: "Re: Empty "If Me.Recordset Is Nothing Then" clause causes runtime error 3021 (Access 2003)"
- Reply: david epsom dot com dot au: "Re: Empty "If Me.Recordset Is Nothing Then" clause causes runtime error 3021 (Access 2003)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|