vba to create a .accde file with 64-bit Access 2013

I successfully use the following code for 32-bit Access:

Public Function ConvertToAccde(SourceDB As String, TargetDB As String) As Boolean
    Dim accessApplication As Access.Application
   
    ConvertToAccde = False
    Set accessApplication = New Access.Application
    With accessApplication
        .SysCmd 603, SourceDB, TargetDB
    End With
    ConvertToAccde = True
    Set accessApplication = Nothing
Exit Function

However, this code does not work for 64-bit Access 2013. It hangs on the .SysCmd line and never exits.

Suggestions please.
ThomasAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rey Obrero (Capricorn1)Commented:
try

   Set accessApplication = New Access.Application
    With accessApplication
         .AutomationSecurity = 1  ' add this line
        .SysCmd 603, SourceDB, TargetDB
    End With
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
That's an un-documented SysCmd() Call, so it's anyone's guess if it even still exists in the same place as it was before, or in the same format.

Jim.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
Also note the other line in that link:

.UserControl = True


 and it does seem that call is still valid.

Jim.
0
ThomasAuthor Commented:
Adding both suggested lines works:

    With accessApplication
        .UserControl = True
        .AutomationSecurity = 1
        .SysCmd 603, SourceDB, TargetDB
    End With

However, opening the accde file shows a white background on some buttons. I will upload a pic if I have that option.

Thank you capricorn1 and Jim Dettman.
0
ThomasAuthor Commented:
Pic of buttons with a white background, resulting from opening the accde.
pic.jpg
0
ThomasAuthor Commented:
Of course, the database has many buttons, but only some buttons have the white background. This does not occur if the accde is created by Access Save As Make ACCDE.
0
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
Interesting.

Personally I would not use that call.  There's too many things needed to make a xDE successfully that cannot be automated.

I know a number of people have tried, but all have given up in the end.  It's just one of those things that probably should remain a manual operation.

Even that aside, the thing with the 603 call is that it may only be one of many steps of the process internally in Access that gets performed when you use "Save as".   603 may be doing nothing more than stripping the source code out and not updating resources, checking that the app is compiled, etc.

In fact your result proves that given that you get a different result.

Jim.
1
ThomasAuthor Commented:
Thank you Jim. That sounds good to me.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.