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,015 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
Comment Utility
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
Comment Utility
0
 
LVL 31

Expert Comment

by:Helen_Feddema
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
My experience with Windows 10 over a one year period and suggestions for smooth operation
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

744 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now