Solved

Distinguish between .accdb and .accde in AutoExec macro

Posted on 2014-01-20
2
632 Views
Last Modified: 2014-01-20
I'd like my AutoExec macro to do different things depending on whether or not I've opened the .accdb or the .accde.

What is the best way for AutoExec to determine which file I've opened?

Thanks in advance!
0
Comment
Question by:jrmcanada2
2 Comments
 
LVL 3

Expert Comment

by:Sreeram
ID: 39795955
Hi

Refer the Below link

http://allenbrowne.com/ser-53.html
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 350 total points
ID: 39796019
You can use this code:

If Right(CurrentProject.Name,2) ="db" then
   ' do this
ElseIf Right(CurrentProject.Name,2) ="de" then
   ' do that
 Else
     ' neither
End If

mx
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

778 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