OutputTo: Variable Path, Fixed Filename

esipp

Registered User.
Local time
Today, 03:17
Joined
Nov 5, 2004
Messages
29
:D I want to output a snapshot report from Access. I want the user to be able to select the file destination, but the report to have a pre-set name that includes the ".snp" extension (otherwise, the novice user will NEVER know to "save as type" and an unusable program file is saved).

Is there a way to have a fixed filename but a user-defined file path?

If not, is there a way to OVERRIDE the "save as type" property to .SNP so the file is functional after the user saves as a custom name? (as is, even with acFormatSNP parameter, the file will not save as a snapshot file unless ".snp" is in the filename)

Please HELP!
 
I would scan the sample DB's for Common Dialog functions. These functions allow you to use the normal Windows SAVE/OPEN functions. You can specify the extensions that are permitted in these functions. Worse case is you could scan the returning filename, strip off the extension and substitue your own.
 
I advise against using the CommonDialog control to browse for a file or directory. Using an API has a lot of advantages. Check this thread out for a working sample you can import into your application...

Browse [Find a directory or file]

I also advise that you search for an answer to your quest before posting because your question has been discussed in a ton of threads on this forum.
 

Users who are viewing this thread

Back
Top Bottom