Distinguish between .accdb and .accde in AutoExec macro

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!
jrmcanada2Asked:
Who is Participating?
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Connect With a Mentor Database ArchitectCommented:
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
 
SreeramCommented:
Hi

Refer the Below link

http://allenbrowne.com/ser-53.html
0
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.

All Courses

From novice to tech pro — start learning today.