Which Access 2000 library did I forget? 
Author Message
 Which Access 2000 library did I forget?

Hi All,

Access 2000 does not recognise the .Edit statement in my modules any more.
For Example this code generates the compile error: "Invalid use of property."

    With MySet
      .Edit
      !MyField = "Something"
      .Update
    End With

I presume that I have forgotten to load a library. Does anyone know which one?

Thanks,
Frans.



Sun, 15 May 2005 02:21:53 GMT  
 Which Access 2000 library did I forget?
Hello All,

I made a silly mistake in my previous mail. This is the correct one.

Access 2000 does not recognise the .Edit statement in my modules any more. For Example this code generates the compile error: "Method or Data
member not found."

     With MySet
      .Edit
      !MyField = "Something"
      .Update
     End With

I presume that I have forgotten to load a library. Does anyone know which one?

Thanks,
Frans.



Sun, 15 May 2005 02:46:58 GMT  
 Which Access 2000 library did I forget?
I solved the problem by explicitly declaring
Dim MyDB AS DAO.Database
where befor I had
Dim MyDB AS Database
but I still don't know why this solved the problem.

Quote:

> ..."Method or Data member not found."

Kind regards,
Frans.


Sun, 15 May 2005 03:38:35 GMT  
 Which Access 2000 library did I forget?


Quote:
>I solved the problem by explicitly declaring
>Dim MyDB AS DAO.Database
>where befor I had
>Dim MyDB AS Database
>but I still don't know why this solved the problem.

Access2000 and 2002 default to using the ADO (ActiveX Data Objects)
model. Both ADO and DAO have recordset objects... but they are
DIFFERENT recordset objects. In particular, the ADO recordset is open
for editing immediately and therefore does not have or need an Edit
method.

It's best to explicitly choose which library you're using; in
addition, it would be wise to Dim rs As DAO.Recordset so you know what
you're getting.

                  John W. Vinson[MVP]    
    Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public



Sun, 15 May 2005 05:17:58 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Access 2000 and code libraries

2. Library databases in Access 2000

3. Missing Libraries Access 2002 vs. 2000 and 97

4. Word 2000 forgets settings

5. Old Data Control / Access 2000 / Object Library?

6. Access 2000 Library

7. read excel file in access 2000 lire fichier excel dans access 2000

8. Importing an Access 2000 table into another Access 2000 database with VB Code

9. Accessing reports in Access 2000 with SQL 2000 as Backend

10. Distributing VB/Access 2000 Apps to non Access 2000 owners

11. doing updating from grid to sql server with stored procedure sql 2000

12. CDO vs Outlook 2000 Object Library?? (Outlook Newbie)

 

 
Powered by phpBB® Forum Software