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,077 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 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

733 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