Results 1 to 3 of 3
  1. #1
    EddieN1 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2011

    Using Textbox or Label as Progress Status Field

    I'm using MS Access 2010 and I have some processes that run using VBA that take a while to run. I would like to show the Operator the status of the progress of the process by showing various status messages on the Form while the Operator is waiting for it to complete. (In other cases I have used a Progress Bar, but in these cases I want to put specific messages on the screen.) I have tried modifying the contents of a text box (Me.txtBoxName="message") and the caption of a label (Me.lblName.Caption="message"), but it doesn't show up on the form consistently as it is modified. I have tried calls to Wait and DoEvents and Me.Repaint and Me.txtBoxName.ReQuery without success. In one case, the first 50 messages do show up, but then it freezes and doesn't show up subsequent messages. Is there any consistent way to get the modified text to show up on the form?

  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    What have you tried? What happens when it freezes, is it in the same place every time? It seems that if you have got as far as that then it should be fixable. Post your code or your database or something to show us what isn't working.

    Me!status=Me!status & "2"

  3. #3
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Ontario, Canada
    Wait is a custom function? A short pause after a query or similar action is performed, followed by the label caption change, followed by the Repaint method followed by another pause should do it. Worked for me, but I used a function to create the pause (usually 1 or 2 seconds will suffice). The trick was that pauses are required as I noted, otherwise any execution can begin before the screen has time to refresh, and we are talking nano seconds here. When control passes to Jet to process queries or table updates, the Access container is basically non-responsive. You may have seen this behaviour when you run a long query - nothing in the database window or vbe will respond to user mouse or keyboard inputs. So trying to repaint a form without a pause prior to running another query can cause the same effect. Here's why you shouldn't use Do Events to create waits in Access.
    - "doesn't work" doesn't help. Implement changes in copies of your database.
    "Everyone has a photographic memory; some just don't have film." Steven Wright

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 03-07-2017, 02:42 AM
  2. Showing Run Progress Status
    By J Bhujanga in forum Programming
    Replies: 2
    Last Post: 12-08-2016, 01:15 PM
  3. Replies: 3
    Last Post: 03-23-2012, 11:21 AM
  4. Form Progress/Status Bar
    By Tomfernandez1 in forum Forms
    Replies: 2
    Last Post: 06-09-2011, 01:01 PM
  5. Progress/Status Bar on Form
    By Tomfernandez1 in forum Forms
    Replies: 5
    Last Post: 05-10-2011, 04:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Other Forums: Microsoft Office Forums - Senior Forums