Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

access+training - output to within access

Forum home » Delegate support and help forum » Microsoft Access Training and help » access+training - Output To within Access Macros

access+training - Output To within Access Macros

ResolvedVersion Standard

Doug has attended:
No courses

Output To within Access Macros

Hi,

I am using 'Output To' in my macro to run a query and then export it into an Excel sheet.

The Excel file I am exporting into is the same one each time, hence I get the message:

"The file 'xxxxx' already exists. Do you want to replace the existing file?"

How can I set this to 'yes' as a default so I don't have to click 'yes' everytime?

Best wishes,

Doug.

RE: Output To within Access Macros

Hi Doug

There is a line of code in VBA that suspends any Warnings/Alerts.

In the Macro just before your Output To code line try using

Application.DisplayAlerts=False

And immediately after the Output To code line use

Application.DisplayAlerts=True

Hope this helps

Carlos

Access tip:

Run with the total

Often when creating reports with lists of transactions it can be useful to have a column which totals the transactions as the report progresses.

Using the Sum function gives the total for the whole group, not a running total.



Access provides an easy method of achieving a running total.



Click on the text box containing the data you wish to contain the running total.
Select the Data tab
Click in the Running sum option
Click the down arrow to view three options

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.11 secs.