[RESOLVED] Hourglass from Access to Excel
I've been messing around trying to get the hourglass to start while I am in Access, and continue while I am in Excel.
IE) I have a report form in Access. When the user clicks "Print Report", it brings up the hour glass, opens excel, and starts populating a report in excel.
The problem is, when excel opens, the hourglass goes away. I have tried looking up the hourglass method to see if there is a solution, but I couldnt find one.
I would post my code, but its mostly just the printing of the report. The line I am trying to use right now is
Any help, even a keyword to search would be very much appreciated :)
Re: Hourglass from Access to Excel
Try
VB Code:
objEx.Visible = False
'Code to populate the spreadsheet
DoCmd.HourGlass False
objEx.Visible = True
That way the focus will not go to Excel
Re: Hourglass from Access to Excel
Hrm, I suppose I could do that..But that brings up another question.
Now, since the report can take a bit to populate, I want to have a progress bar.
This progressbar will pop up on a modual form and will increase based on the current record, out of the max records.
Problem is, I need a timer to increase the progressbar...and that will stop my other code from running, will it not?
Basically what I am asking is: is there a way to have the progress bar increase without stopping my other code from running?
And I cannot have it on the same form, it has to be on another one..or some other way of displaying it
Nevermind, I figured it out
Re: [RESOLVED] Hourglass from Access to Excel
And you fixed it with??
Hopefully it was just increments and DoEvents in the loop around the recordset??
Re: [RESOLVED] Hourglass from Access to Excel
I just referenced the Progress bar form from the form doing the calculations. Then I placed some DoEvents so it would look nice while doing it
VB Code:
Forms![frmprogress]![progReport].Value = Forms![frmprogress]![progReport].Value + 1