Results 1 to 5 of 5

Thread: [RESOLVED] Hourglass from Access to Excel

  1. #1

    Thread Starter
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Resolved [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

    VB Code:
    1. DoCmd.Hourglass True

    Any help, even a keyword to search would be very much appreciated

  2. #2
    Fanatic Member dannymking's Avatar
    Join Date
    Jul 2005
    Location
    Darlington, North East UK
    Posts
    677

    Re: Hourglass from Access to Excel

    Try

    VB Code:
    1. objEx.Visible = False
    2. 'Code to populate the spreadsheet
    3. DoCmd.HourGlass False
    4. objEx.Visible = True

    That way the focus will not go to Excel
    Danny

    Never Think Impossible

    If you find my answer helpful then please add to my reputation

  3. #3

    Thread Starter
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    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
    Last edited by kfcSmitty; Sep 2nd, 2005 at 10:03 AM.

  4. #4
    Fanatic Member dannymking's Avatar
    Join Date
    Jul 2005
    Location
    Darlington, North East UK
    Posts
    677

    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??
    Danny

    Never Think Impossible

    If you find my answer helpful then please add to my reputation

  5. #5

    Thread Starter
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    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:
    1. Forms![frmprogress]![progReport].Value = Forms![frmprogress]![progReport].Value + 1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width