Solved

Distinguish between .accdb and .accde in AutoExec macro

Posted on 2014-01-20
2
627 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

937 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

Need Help in Real-Time?

Connect with top rated Experts

1 Experts available now in Live!

Get 1:1 Help Now