Results 1 to 6 of 6
  1. #1
    Max2413 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2016
    Posts
    9

    Status lable timeouts

    Okay,


    So I have an inventory system that uses a scanner and a text box to take input. I am using label captions to show status messages ("barcode found and recorded as a sale"). I would like to know if there is a way to update the caption for 10 seconds, at which it defaults to a default message ("idle..."). OR just change with the next scan.

    Using the system time ticks is not relative to the time of the caption update, And therefore will sometimes be a 1 second interval.

    Thanks in advance!
    Max

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    set the form property TIMER INTERVAL = 10000 (10 secs in microseconds)

    set the form event ON TIMER, to set the label
    label.caption = "idle..."

  3. #3
    Max2413 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2016
    Posts
    9
    Quote Originally Posted by ranman256 View Post
    set the form property TIMER INTERVAL = 10000 (10 secs in microseconds)

    set the form event ON TIMER, to set the label
    label.caption = "idle..."
    I understand this, but my issue is I want it to be 10 seconds from the time it was updated. Using the time interval function means every 10 seconds it updates.

    If the last scan was at the 9th second during the time interval... my status message will only be present for 1 second.

    I am looking for a way to reference the time of the change and have it revert to default 10 seconds after that point OR after the next scan.

  4. #4
    Max2413 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2016
    Posts
    9
    Shit... I think I got it.

    I'll save the last update time in a table and then run a timer interval function every 1000 milliseconds that compares time of the update to the TIME function (system time).

    I intend to save this information in a single row dataset... unless I make a global variable for the most recent updated time.

    I will try this and post my results, feel free to critique!

    Again, thank you all!

  5. #5
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    then set timer = 0 to turn off the timer.

  6. #6
    Max2413 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2016
    Posts
    9
    I will try both ways later. I think what you mean, and what I think makes sense to me is:
    On keypress
    Check for enter
    Yes: timer = 0
    Update caption
    Set timer 10000 at this time.

    On timer
    Set timer off
    Update caption.

    Is that What your saying?

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

Similar Threads

  1. Change Lable text my macro
    By stu_C in forum Reports
    Replies: 7
    Last Post: 10-27-2015, 09:25 AM
  2. Replies: 3
    Last Post: 01-14-2014, 04:17 PM
  3. Replies: 2
    Last Post: 08-21-2013, 05:30 PM
  4. Replies: 4
    Last Post: 06-20-2013, 10:26 PM
  5. Replies: 2
    Last Post: 10-19-2011, 03:21 AM

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