common dialog

R

Rosita

I'm trying to improve the funcionality of one of my forms adding a button in
the way that when the user click the button, it appears a window dialog to
select files. I think this is by a common dialog, and I've added this
control to my form, but I don't see any metod in the control for doing so.

Does anyone know how to do this?
 
D

Dirk Goldgar

Rosita said:
I'm trying to improve the funcionality of one of my forms adding a
button in the way that when the user click the button, it appears a
window dialog to select files. I think this is by a common dialog,
and I've added this control to my form, but I don't see any metod in
the control for doing so.

Does anyone know how to do this?

I suggest you don't bother with the CommonDialog control; it's not that
easy to use and it's subject to lots of version-related probloems.
Instead, call the Windows File Open/Save dialog directly, using the code
posted here:

www.mvps.org/access/api/api0001.htm
 
D

David Lloyd

Another option is to use the FileDialog property of the Application object.
The following KB article is a good reference.

http://support.microsoft.com/default.aspx?scid=kb;en-us;279508

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


I'm trying to improve the funcionality of one of my forms adding a button in
the way that when the user click the button, it appears a window dialog to
select files. I think this is by a common dialog, and I've added this
control to my form, but I don't see any metod in the control for doing so.

Does anyone know how to do this?
 
D

David Lloyd

The KB article outlines the version issues. The user did not state the
version they were using. I simply posted it as another alternative the user
may want to consider. The user did not indicate anything about file saving,
so I did not address the issue.

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


David Lloyd said:
Another option is to use the FileDialog property of the Application
object. The following KB article is a good reference.

http://support.microsoft.com/default.aspx?scid=kb;en-us;279508

Yes, if it's available in the version of Access you're using, or
targeting. It was introduced in Access 2002. Bear in mind, also, that
the Access version of Application.FileDialog won't let you open the File
Save dialog.
 
D

Dirk Goldgar

David Lloyd said:
The KB article outlines the version issues. The user did not state
the version they were using. I simply posted it as another
alternative the user may want to consider. The user did not indicate
anything about file saving, so I did not address the issue.

Sorry, I didn't mean to sound like I was disputing or denigrating your
suggestion. I just wanted to point out the additional consderations.
 
Top