Conversion of Access 2007 to the latest version

JERRY89
4StarLounger
Posts: 516
Joined: 21 Feb 2016, 02:52

Conversion of Access 2007 to the latest version

Post by JERRY89 »

Dear All,

Good Day,

May i know is there a specific place where i can learn how to convert Access 2007 to the latest version. I need it..Now i still figuring how to do it. :scratch:

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Conversion of Access 2007 to the latest version

Post by HansV »

Access 2007 and all later versions use the .accdb database format. There is no need to convert the databases.

But you might encounter a problem: Access 2007 was the last version that included the Microsoft Calendar Control. If you used that in your database, it won't work anymore.

And if you now have the 64-bit version of Office, and if you use Windows API functions in your VBA code, you may have to update the code.
Best wishes,
Hans

JERRY89
4StarLounger
Posts: 516
Joined: 21 Feb 2016, 02:52

Re: Conversion of Access 2007 to the latest version

Post by JERRY89 »

Hi Hans,

Is there any possibility to enable Microsoft Calendar Control in Access again in the newer version and how to check if the VBA contain API funtion? :scratch:

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Conversion of Access 2007 to the latest version

Post by HansV »

Do you know whether the new version is 32-bit or 64-bit?
Best wishes,
Hans

JERRY89
4StarLounger
Posts: 516
Joined: 21 Feb 2016, 02:52

Re: Conversion of Access 2007 to the latest version

Post by JERRY89 »

Hi Hans,

Is 64 bit...

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Conversion of Access 2007 to the latest version

Post by HansV »

In that case, the Calendar Control won't work - it is 32-bit only. You will have to remove the calendar control from all forms and replace it with a text box. Access will automatically display a small pop-up calendar:

S3417.png
S3418.png

You will have to remove or edit the code that refers to the calendar control too.
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Conversion of Access 2007 to the latest version

Post by HansV »

As for API declarations: look for lines that begin with Declare or Private Declare or Public Declare near the top of modules.

See Jan Karel Pieterse's article Declaring API functions in 64 bit Office
Best wishes,
Hans

JERRY89
4StarLounger
Posts: 516
Joined: 21 Feb 2016, 02:52

Re: Conversion of Access 2007 to the latest version

Post by JERRY89 »

Hi Hans,

Can you provide me a sample if a VBA code that contain API Function in Access 2007 how it can be change to suite to the latest Access.

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Conversion of Access 2007 to the latest version

Post by HansV »

From the article I linked to: suppose you have a line

Code: Select all

Declare Function EmptyClipboard Lib "User32" () As Long
Calling EmptyClipboard will clear the Windows clipboard.

In recent versions of Access you can use

Code: Select all

Declare PtrSafe Function EmptyClipboard Lib "User32" () As LongPtr
This is written for the 64-bit version of Office, but it will work in the 32-bit version too.
Best wishes,
Hans

JERRY89
4StarLounger
Posts: 516
Joined: 21 Feb 2016, 02:52

Re: Conversion of Access 2007 to the latest version

Post by JERRY89 »

Hi Hans,

Thanks a lot for your guidance. I will try to do first.

JERRY89
4StarLounger
Posts: 516
Joined: 21 Feb 2016, 02:52

Re: Conversion of Access 2007 to the latest version

Post by JERRY89 »

Hi Hans,

Good Day,

Sorry trouble you again, after i check the file format is under Microsoft Office Access Record-Locking Information (.ldb) and is map using MS-DOS Batch File so if i upgrade to Microsoft Office 2019, can i remain the format as .ldb, i need your guidance in this matter.

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Conversion of Access 2007 to the latest version

Post by HansV »

A .ldb file is not a database; it's a so-called locking file that Access creates when a .mdb database is opened. Under normal circumstances, the .ldb file is automatically deleted when the (last) user closes the database, but sometimes it remains behind. If you are sure that the .mdb database is not open, you can safely delete the .ldb file.
So you certainly don't need to convert the .ldb file.

Although Access in Office 365 can open a .mdb database, I would recommend converting it to .accdb format. That is the current database format. This can be done through File > Save As.
Best wishes,
Hans