Solved Database gets error message after transferring from Access 2010 to Runtime 2013

AC_Alberta

New member
Local time
Today, 16:58
Joined
Mar 31, 2025
Messages
5
Hi, hope someone has the answer. When transferring a 2010 database from desktop to laptop which only has Runtime 2013, it usually opens without problems.
However when I include fade in/out on open from autoexec macro, Runtime is throwing up the following error message:
"There was an error in compiling this function. The visual Basic module contains a syntax error"

This happens when I include the following:

Public Declare Function SetWindowOpacity Lib "User32" Alias "SetLayeredWindowAttributes" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long

Public Declare Sub Sleep Lib "kernel32" (ByVal lngMilliSeconds As Long)

Public Const LWA_ALPHA = &H2
Public Const GWL_EXSTYLE = (-20)
Public Const WS_EX_LAYERED = &H80000

Works perfectly when on Access 2010, but Runtime is a fail.
Any help or suggestions would be greatly appreciated.
 
Do you have 64bit access for the runtime?
Any api code will need to be be modified.

Probably easier to install 32bit runtime
 
Thanks, I'll give it a go and get back to you. Can't remember if the 32 or 64 options came up when I downloaded Runtime 2013 but will check.
 
Default for full access is 64 bit, so runtime might be the same?
Should be able to check quite easily I would have thought?
 
Five stars to you. Went back and checked, it was 64. There was no 32 option to download but I tried it with x86.
Works perfectly. You've saved me hour of angst and hair tearing.
Many thanks indeed. I know where to come now for friendly advice.
 
Well TBH that was a lucky guess from previous posts, as I only have/use 32bit. :)
 
Still worked though. Well done.
Oh, and commiserations for the rugby.
We watch it over here in Canada and it's certainly getting traction in the schools as more and more teams are popping up.
 
I am from the era whan Wales were Grand Slam and Triple Crown champions year after year. :)
I do not watch it anymore. Just as well, with the way they are these days. :(
 

Users who are viewing this thread

Back
Top Bottom