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

linking a marco to a button

Status
Not open for further replies.

yld53x

Programmer
Oct 9, 2002
8
0
0
AU
hi

how do i link a button to prompt for a file and once you have entered the file name and click ok, the macro should also run 3 queries once you have clicked ok.

thanks
 
Hi,

I don't believe there is a way to propmpt a user for the file name using macros, you would do this in VBA, prompting for a file location and using the reults to identify the file path/name in a docmd.transferText method.

After the transfer, you can use the docmd.openQuery method to open/execute the queries you require.

Cheers

Steve
 
A macro will prompt you for a file name if you leave the "file name" section blank.

Create a new macro
Choose "OutputTo" as the action.
Fill out the object type, object name, and file format. Leave the file name blank.

When you run the macro, a window will pop up, allowing you to browse for the location and/or name.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top