Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / July 2007

Tip: Looking for answers? Try searching our database.

Access 2007 - upgrade problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gordon - 08 Jul 2007 16:28 GMT
I have converted my Access 2003 database to 2007, but when I try to
compile the code now, I get an error "Method or data member not found"
with the word "edit" highlighted in the following piece of code:

Private Sub cmdImportTracks_Click()
        Dim db As DAO.Database, rs As Recordset, lintkount As Integer
         Set db = CurrentDb()
         Set rs = db.OpenRecordset("tblCutsTemp")

         lintkount = 1
         Do While Not rs.EOF
         rs.Edit
         rs!fldTrackNo = FORMAT(lintkount, "##") ' formats like A 1,A
2...A10
         rs.Update
         lintkount = lintkount + 1
         rs.MoveNext
         Loop
         rs.Close
         Set rs = Nothing
         Set db = Nothing

End Sub

I had no problems with this in Access 2003 - can anyone suggest what
is causing this?

Thanks

Gordon
Allen Browne - 08 Jul 2007 16:35 GMT
1. Make sure the folder where your database resides is a trusted folder:
   Office Button | Access Options | Trust Center | Trust Center Settings.

2. Check your library references:
   http://allenbrowne.com/ser-38.html
Make sure none are missing, and you have the DAO one chosen.

3. Be explicit about the library you want, i.e. change the first line to:
   Dim db As DAO.Database, rs As DAO.Recordset, lintkount As Integer

4. Try editing tblCutsTemp directly.
Do you have the priviliges (Access and Windows)?

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

>I have converted my Access 2003 database to 2007, but when I try to
> compile the code now, I get an error "Method or data member not found"
[quoted text clipped - 26 lines]
>
> Gordon
Gordon - 08 Jul 2007 19:17 GMT
Hello Allen,

Thanks for the superfast response.  Database is "trusted" and no
"missing" references indicated but there were a few pieces of code
which did not explicitly reference DAO (as in the sample code I
listed).  Fixing those has solved the problem.  But on reading your
web article on references I noticed that though I have DAO360.dll
registered, there is no reference to acedao.dll which your guide
indicates is necessary fro Access 2007.

I followed the written advice and tried to register this using
regsvr32 (even unregistering and re-registering) but to no avail.  All
I get when running regsvr32 is a message saying "...acedao.dll was
loaded but the DllRegisterServer entry point was not
found.  ......acedao.dll does not appear to be a .dll or .ocx file".

Have I got other problems yet to be found in my converted database? I
have to confess I have not yet fully tested the "converted" database
for all its functionality. I am working my way through it !!!

I have to admit also I am finding Access 2007 a steep learning curve
<sigh>.

Gordon
Allen Browne - 09 Jul 2007 03:03 GMT
Hi Gordon

In Access 2007, the DAO library refers to ACDDAO.DLL if you use the new file
format (ACCDB.) But if you open an MDB in Access 2007, the DAO library
refers to DAO360.DLL (i.e. the same library as the previous 3 versions did.)
You can verify this, by opening the Immediate Window (Ctrl+G), and entering:
   ? References("DAO").FullPath

Therefore if your file is an MDB, you have the right reference.

Have updated the web page to make that clearer.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Hello Allen,
>
[quoted text clipped - 18 lines]
> I have to admit also I am finding Access 2007 a steep learning curve
> <sigh>.
Gordon - 09 Jul 2007 11:36 GMT
Hi Allen,

My converted database is (now) an accdb file.  Running the ?
References("DAO").FullPath in the immediate window brought up the
ACEDAO.DLL path reference. <sigh of relief>.

Thanks for the clarification.

Gordon
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.