[AccessD] Use of Application.FileDialog(msoFileDialogSaveAs) in Access 2007

Stuart McLachlan stuart at lexacorp.com.pg
Sat Jan 22 18:27:42 CST 2011


I only ever use the API.  The wrapper function with makes the API call is in a module that I 
put into all of my applications which contains a number of similar functions.

It is much simpler to use than the FileDialog.  Just a single call to the wrapper function 
returns the file name rather than DIMing an object, SETing it, using it and then getting the 
return value.   

If I want to,  I can change any of the parameters with little effort, but generally, the only thing I 
want to change is the initial  directory so I made that a parameter of the function call and 
keep the rest in the wrapper function as defaults.   

-- 
Stuart


On 22 Jan 2011 at 18:46, Mark Simms wrote:

> My question: for basic dialogs, is the 2007 version of FileDialog
> "good enough" ? I know the API has a ton of parameter values to tweak
> it. Actually, to me, it seems like over-kill.
> 
> So what's the consensus ? :
> 1) I'll only use the API
> 2) I'll only use the FileDialog
> 3) It depends.....
> 
> > -----Original Message-----
> > From: accessd-bounces at databaseadvisors.com [mailto:accessd-
> > bounces at databaseadvisors.com] On Behalf Of Charlotte Foust
> > Sent: Saturday, January 22, 2011 2:09 PM
> > To: Access Developers discussion and problem solving
> > Subject: Re: [AccessD] Use of
> > Application.FileDialog(msoFileDialogSaveAs) in Access 2007
> >
> > The API call should continue to work, at least for 32 bit
> > environment (I haven't worked with 64-bit API).  I've used it in all
> > versions of Access from 97 through 2007 without problems.
> >
> > Charlotte Foust
> >
> > On Fri, Jan 21, 2011 at 12:03 PM, Brad Marks
> > <BradM at blackforestltd.com> wrote:
> > > Charlotte,
> > >
> > > Yes, in my initial tests, it appears to work nicely.
> > >
> > > I am just a little hesitant to go forward with this approach if
> > > there
> > is another approach that is a better path to follow.
> > >
> > > This is my first attempt at using Application.FileDialog and I
> > > would
> > like to get started on the right foot.
> > >
> > > Thanks,
> > > Brad
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: accessd-bounces at databaseadvisors.com [mailto:accessd-
> > bounces at databaseadvisors.com] On Behalf Of Charlotte Foust
> > > Sent: Friday, January 21, 2011 10:58 AM
> > > To: Access Developers discussion and problem solving
> > > Subject: Re: [AccessD] Use of
> > Application.FileDialog(msoFileDialogSaveAs) in Access 2007
> > >
> > > Um, didn't you just say it seems to work?  Anymore, there are no
> > > bets going forward, since MS decided to limit backwards
> > > compatibility.
> > >
> > > Charlotte Foust
> > >
> > > On Fri, Jan 21, 2011 at 7:55 AM, Brad Marks
> > <BradM at blackforestltd.com> wrote:
> > >> All,
> > >>
> > >> I have just started to experiment with
> > Application.FileDialog(msoFileDialogSaveAs).
> > >>
> > >> We have an Access 2007 application that uses
> > "DoCmd.TransferSpreadsheet" to generate several Excel files from
> > Access Queries.  Currently this application has the name of the
> > Excel file "hard coded" in the application.
> > >>
> > >> I would like to give our end-users the option of changing the
> > >> name
> > of the Excel file (and folder name) when the file is generated.
> > >>
> > >> Using  Application.FileDialog(msoFileDialogSaveAs) seems to work
> > nicely, but I am a bit concerned that this may not be a good
> > long-term approach.
> > >>
> > >> When doing research about this method, I stumbled upon this
> > statement on a Microsoft web page.
> > >>
> > >> " msoFileDialogSaveAs constants are not supported in Microsoft
> > Office Access 2007"
> > >>
> > >> This, and other comments that I have read have made me wonder if
> > >> I
> > am heading down the wrong path. (no pun intended)
> > >>
> > >> Is Application.FileDialog(msoFileDialogSaveAs) a viable approach?
> > >>
> > >> Is there a better way to give the end-users an easy way to change
> > the name (and folder) of the generated Excel file?
> > >>
> > >> Thanks,
> > >> Brad
> > >>
> > >> --
> > >> AccessD mailing list
> > >> AccessD at databaseadvisors.com
> > >> http://databaseadvisors.com/mailman/listinfo/accessd
> > >> Website: http://www.databaseadvisors.com
> > >>
> > >>
> > >
> > > --
> > > AccessD mailing list
> > > AccessD at databaseadvisors.com
> > > http://databaseadvisors.com/mailman/listinfo/accessd
> > > Website: http://www.databaseadvisors.com
> > >
> > > --
> > > This message has been scanned for viruses and
> > > dangerous content by MailScanner, and is
> > > believed to be clean.
> > >
> > >
> > > --
> > > AccessD mailing list
> > > AccessD at databaseadvisors.com
> > > http://databaseadvisors.com/mailman/listinfo/accessd
> > > Website: http://www.databaseadvisors.com
> > >
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> 
> 
> 







More information about the AccessD mailing list