Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXPORT TO DIALOGE

Status
Not open for further replies.

gentforreal

Programmer
Oct 19, 2002
62
0
0
US
Is there a way to force the export to dialoge box to appear from within a form with a button click? once a query is produced into a table, I want the user to have the option to save it in the folder of thier choice. Any ideas?
 
gentforreal

An option might be to use GETDIR() prior to exporting and place the directory selectin into a variable, then export your file to that directory.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
I'm not sure what you mean by the export dialogue. If you mean the Save As dialogue, you can do that with Putfile(). Just call the function, and it will return the path and filename that the user selected.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
I thought putfile() would work.. but it gives on option to save as a dbf file and I am getting complaints. I'm using vp6.0
I wonder if there is a better way to allow someone to save the results of a query to table to wherever they want, with any name and not be complicated about it. The export dialog cant be called from within the form like putfile() works?
 
--->"but it gives on option to save as a dbf"

I meant DOES NOT give the option to save a DBF
 
Have you thought of modifying the _outputdialog class from the _reports.vcx that comes with VFP? Let your user save it as a DBF or Text or HTML add your own stuff to it too...or better yet, just grab the code that you need from it and make your own from scratch.

boyd.gif

[sub]craig1442@mchsi.com[/sub][sup]
"Whom computers would destroy, they must first drive mad." - Anon​
[/sup]
 
I cant find a reports .vcx.. sounds nice. In version 6.0?
 
With PUTFILE(), the second parameter allows you to specify a default file name for the output. If you want to use a default filename, I'd go with PUTFILE(). If you only want to default the extension, then use GETFILE() instead. The first parameter of GETFILE() allows you do specify file extensions.


-BP (Barbara Peisch)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top