Data Member not Found

L

LJG

Can anyone tell me why I keep getting the message :

Method or data member not found

: when I compile my project

This refers to List0 which IS the name of the list control I have on my
form. My concern would be that when I start to write the line 'rst.FindFirst
"salescontactID = " & List0' in the code window FindFirst does not show as a
choice only Find.

This is my code, any suggestions please


Dim rst As Recordset

Set rst = Forms!frmNewClientDetails.RecordsetClone

rst.FindFirst "salescontactID = " & List0
Forms!frmNewClientDetails.Bookmark = rst.Bookmark
DoCmd.Close acForm, "frmNewClientSelect"


Thanks
 
6

'69 Camaro

Hi.
rst.FindFirst "salescontactID = " & List0

FindFirst requires the DAO library. Access 2000 uses the ADO library by
default, so if this is not a database that was converted from Access 97, it
doesn't have the correct library referenced.
Dim rst As Recordset

You should disambiguate this declaration if you choose to keep the ADO library
and add the DAO library, too. Change it to:

Dim rst As DAO.Recordset

For more information on this common problem, please see the following Web page
for a link to Access MVP Tom Wickerath's article, "ADO and DAO Library
References in Access Databases":
http://www.Access.QBuilt.com/html/articles.html

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact info.
 
L

LJG

Cheers thanks for that, I have been using an old Access 97 book as guidance.

Thanks
Les
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top