Solved

Overcoming compile error constants, fixed-length strings not allowed in converting Access 2007 32-bit file to Access 2010 64-bit?

Posted on 2010-09-07
3
1,047 Views
Last Modified: 2013-11-27
All I have two modules that I'm trying to convert from Access 2007 32-bit to now Access 2010 64-bit and both are giving me the same error?

What is the correct syntax I should use for?

theh error I get is compile error.

Constants, fixed-length strings, arrays, user-defined types and declare statements now allowed as public members of object modules.  And all the statements are highlighted.

I've got some interesting insight from http://gpgonaccess.blogspot.com/2010/03/work-in-progress-and-64-bit-vba.html on how to overcome most functions but even with the PtrSafe I still get the errors.
Declare PtrSafe Function StartupShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long


Declare PtrSafe Function apiCopyStartup Lib "kernel32" Alias "CopyFileA" _
(ByVal lpExistingFileName As String, _
ByVal lpNewFileName As String, _
ByVal bFailIfExists As Long) As Long

Open in new window

0
Comment
Question by:stephenlecomptejr
  • 2
3 Comments
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 33617327
It appears that your API calls are for the 32 bit APIs.  If you are running in 64 bit, you must use the 64 bit APIs.
0
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 500 total points
ID: 33617337
0
 
LVL 31

Expert Comment

by:Helen_Feddema
ID: 33618112
Also, those API calls may have been carried over from long-ago versions of Access.  They may not be needed any more, because of additions to the Access and Office object models.  Copying files, for example, can be done with the Scripting Runtime Library FileSystemObject.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question