Don't think the data object library has anything to do with it, rather one of the following:
* the control (txtAnum) doesn't contain any value (try testing with isnull prior to .findfirst)
* the field (Abanum) is not text, if numeric:
[tt]"Abanum=" & txtAnum[/tt]
- no qualifiers
if date:
[tt]"Abanum=#" & txtAnum & "#"[/tt]
- hash as qualifier
If the Abanum field is text, and the txtAnum is an ordinary text control, you might also check into other functions like Trim, to remove leading/trailing spaces.
Using DAO vs ADO.
It seems most of the samples of recordset manipulation on this site is DAO...
A thing to a little about, is that Access 97 and previous versions defaults to DAO (but I think you can also install and use ADO there)
In Access 2000+ versions the default library for manipulating data is ADO - BUT the form recordsets (bound forms) defaults to DAO (don't know for sure about 2003), unless you're working with ADP/SQL backend. One thing to consider, is that allthough it's possible to assign/bind an ADO recordset to an Access 2000 form, the recordset will not be updateable (read only), which is why I often prefer working with DAO on forms (bound forms). In xp, ADO recordsets can both be bound and be updateable, but because I often work with db's that need to work both on a2k and xp, I use DAO (again, for bound forms).
When using unbound forms and for other recordset manipulation, let the preferences guide. It seems DAO is "slowly dying" and ADO is to replace it. So sooner or later, we'll all have to be able to use it, so I decided to jump on that train in 2000, and use ADO for all recordset manipulation outside bound forms.
I didn't think I was doing any recommandations in the previous replies, but only trying to address why the error popped up, and giving a sample of opening an ADO recordset. Should I be persuaded to give an opinion, it would be to start learning/looking into/using ADO, because we don't know how long Microsoft is going to support DAO.
I've seen several threads here discussing ADO/DAO, one of them in the Access Developer forum thread1121-782286, you'll probaly also find other threads thru a keyword search.
Roy-Vidar