[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 322
  • Last Modified:

Flashing object

Hello any expert

is there a function in access 97 to enable a flashing label. I want to flag the users if a piece of equipment is still under warranty by having a flashing label next to the expire date text box. or can you help me with some code, many thanks

1 Solution
You could declare and then call the FlashWindow procedure from the Win32 API. This will flash the title bar for a form if it is not maximized.
You can use the form's Timer event to toggle the visibility of any control on the form.  You can use the form's On Current event to check the value of the displayed data and decide whether to trigger the Timer event.

Suppose you have a label called "FlashLabel".

Private Sub Form_Current()

    ' turn off flash label
    FlashLabel.Visible = False

    If WarrantyExpireDate < Now() Then ' test data condition
        Me.TimerInterval = 200        ' execute timer event every 200 milliseconds
        Me.TimerInterval = 0          ' turn off timer event
    End If
End Sub

Private Sub Form_Timer()
    ' switch visibility of FlashLabel
    FlashLabel.Visible = Not FlashLabel.Visible
End Sub


Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now