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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Any way to invoke the Export Wizard from VBA? (in access 2000)

Status
Not open for further replies.

Paul7905

MIS
Jun 29, 2000
205
US
I would like to be able to invoke the Access 2000 Export Wizard in VBA.

What I would like to do is start the Export Wizard in the click event on a form and pass the wizard the name of a table (or even better, a query which wold be driven by paramaters the user chooses on the form) in VBA and then let the user take it from there (using the Wizard to do the export).

anyone done this?

Thanks

Paul
 
I would do this with 2 seperate calls:

the first call passes the parameter to the query

the second call uses the docmd object to export the query using your parameters, as desired, i.e.


Docmd.outputTo(objectType, objectName, OutputFile..etc)

hope this helps

:eek:)

Hj
 
HJ, thanks, I am doing it this way currently however I really would like to invoke the Wizard from code to give the user control over the export (can choose the type of export etc).

I have seen an access 97 application that does just that. Trouble is, I don't know how the author of the application managed to invoke the Access Export Wizard from code.

Paul
 
Thats kool, the wizard would look much prettier -- however, you could just as easily put together a front-end that would pass the same parameters -- i.e

look for mdb file -- choose object type, object name etc..

If you do find out how to invoke the wizard, let me know -- id love to see how it all works :eek:)
hiren.jogia@capita.co.uk

Hj

 
HJ,

The following is how i finally ended up doing this (Rick Sprague on the forum gave me this tip).


Private Sub Query_Result_Export()

DoCmd.OpenQuery "ScanArchiveAdjSub"
SendKeys "%FE"

End Sub

the docmd runs a query and opens the query results up on the screen.
the sendkeys basically automates the keystrokes the user would have to key to bring up the wizard.

alt F E

Paul
 
Is there any way of doing this in a way so that the control is passed back to the call form after the export has taken place?


Hj

:eek:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top