Solved

Distinguish between .accdb and .accde in AutoExec macro

Posted on 2014-01-20
2
634 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 - Microsoft MVP, Access and Data Platform) 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Access VBA Object Variable Not Set. Can't figure this out. 11 43
IIF syntax in MS Access 1 58
Clear Current Value from Combobox 2 24
Access 2010 7 31
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…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

713 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