Error 3201- BOF, EOF

ppoindexter

Registered User.
Local time
Today, 17:44
Joined
Dec 28, 2000
Messages
134
I get this error when i try to select a record from a combo box....error 3021 - Either BOF or EOF or record has been deleted....

Can anyone tell me what BOF and/or EOF is?
i know the record has not been deleted.

thanks
pat
 
BOF - Beginning Of File
EOF - End Of File

- here meaning that the cursor is either before the first record (BOF) or after the last record (EOF). I suspect that this is because the record you are trying to find, does not exist whitin the recordset you are searching (for instance on a form, the DataEntry property is set to yes (only showing new records) or the form is filtered, so that when there's no match, it's an attempt to set the recordsets bookmark to a record that doesn't exist).

What I usually do when I do a "findfirst", is to test whether a record is found prior to assigning the bookmark. If this is your situation too, try:

dim rs as dao.recordset
set rs=me.recordsetclone
rs.findfirst <your expression>
if not rs.nomatch then me.bookmark=rs.bookmark
 
thanks roy
i will try your suggestion
 
My above suggestion will only deal with the errormessage, which is only a symptom. You'd also need to check if my assumption was correct - is the form filterered in any way? If so, you'd need to either

* remove the form filter prior to searching
* alter the rowsource of the combo, so it operates with the same filter as the form

based on what you need (search all records, or only those records currently withing the forms recordset - i e based on current filter)
 

Users who are viewing this thread

Back
Top Bottom