What type of file am I?

  • Thread starter Thread starter alex
  • Start date Start date
A

alex

Using Access ‘03

Is it possible for an Access file to know what type of file it is?

E.g.,

If FileExtension = .mde then
‘Run some code
Else
‘nothing
End IF

Thanks,
alex
 
Using Access ‘03

Is it possible for an Access file to know what type of file it is?

E.g.,

If FileExtension = .mde then
‘Run some code
Else
‘nothing
End IF

Thanks,
alex


If Right(CurrentDB.Name,3) = "MDE" Then...
 
m:
Using Access '03

Is it possible for an Access file to know what type of file it is?

E.g.,

If FileExtension = .mde then
'Run some code
Else
'nothing
End IF

Not a good idea, as a file can be any arbitrary file extension.

What you want is:

CurrentProject.ProjectType

Also, for MDBs,

CurrentProject.FileFormat

can help you distinguish between the various versions of the MDB
file format.

I don't have A2007 installed to test, but I assume constants have
been added to the enums for these in order to cover the new file
format and its variants.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Shift ByPass 4
Determine File Location 2
Determine if File is open 8
Should I decompile? 3
Hide .ldb 3
New version of the Auto FE Updater available 10
Is File Open 8
Can file kill itself on close? 6

Back
Top