"Quiet" Code? (1 Viewer)

EdFred

knows enough, dangerous
Local time
Yesterday, 21:39
Joined
Mar 2, 2007
Messages
129
I've recently "upgraded" to 2007, and here is something that is REALLY ticking me off as it did not do it in the previous version I used.

When I get open up my database it checks to the last time I ran a series of reports. If it hasn't been done yet today it runs the report and publishes it to the network drive. In previous versions I could switch over to another program and let it run in the background. Now, in the glorious improvements made in 07, every time it runs this

Code:
For i = 1 To rs.RecordCount
    (some lines of code)
    DoCmd.OutputTo acOutputReport, "Web Inventory", acFormatHTML, "W:\inventory\inventory" & strVendor & ".htm"
    rs.MoveNext
Next i

It takes me back to Access to "let me know" it's outputting a report. Great. Yes. I know the reports are being published. I *%&$ built the code to do it, of course I know it's runnin. Now let me work in something else.

Application.Echo False does not solve the issue.
 

KenHigg

Registered User
Local time
Yesterday, 21:39
Joined
Jun 9, 2004
Messages
13,327
Have you tinkered with the setwarnings feature?
 

EdFred

knows enough, dangerous
Local time
Yesterday, 21:39
Joined
Mar 2, 2007
Messages
129
Have you tinkered with the setwarnings feature?


It's not a warning, just a dialogue box saying that it's outputting the report. And even after messing with it, it does not seem to work, as I am typing this it keeps taking me back to access.
 

KenHigg

Registered User
Local time
Yesterday, 21:39
Joined
Jun 9, 2004
Messages
13,327
Here's a quick read that may offer a little help:

Link
 

EdFred

knows enough, dangerous
Local time
Yesterday, 21:39
Joined
Mar 2, 2007
Messages
129
Here's a quick read that may offer a little help:

Link

I don't see how that is relevant to my situation. The HTML output is fine. The files are being written correctly. The code works as it should. What I don't want is Access to continually telling me that it's outputting every file when it cycles through each record in the recordset. Thanks for the help though.
 

KenHigg

Registered User
Local time
Yesterday, 21:39
Joined
Jun 9, 2004
Messages
13,327
Sometimes you have to take a few steps back to make one forward... For example if you can't figure out how to disable the message you may be able to utilize the 'print statement' method referred to in the link...

Hope this help,
 

EdFred

knows enough, dangerous
Local time
Yesterday, 21:39
Joined
Mar 2, 2007
Messages
129
I found a solution that worked.

I built a second db and linked the necessary tables (7) and imported the necessary queries (7) and the module that runs it all.

Dim objAccess as New Access.Application

With objAccess
.Visible = False
.OpenCurrentDatabase ("S:\Access Files\InventoryExport.accdb")
.Run "ExportToWebsite"
End With

objAccess.Quit
Set objAccess = Nothing

Quiet as a mouse.
 

Users who are viewing this thread

Top Bottom