?
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
Medium Priority
?
1,154 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 93

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 93

Accepted Solution

by:
Patrick Matthews earned 2000 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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
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…
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

771 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