Help with Flashing Notice on Form

  • Thread starter Thread starter Tera News Server
  • Start date Start date
T

Tera News Server

I have a form with a field for membership expiration date (field name
[expdate] on it. What I would like to be able to do is that if the
expiration date is past the current days date that a text message flash on
and off with some sort of warning like "Membership Expired".

Can this be done, and if so could someone guide me in the right direction.

Thanks in advance.
TK at MSO
 
Tera News Server said:
I have a form with a field for membership expiration date (field name
[expdate] on it. What I would like to be able to do is that if the
expiration date is past the current days date that a text message flash on
and off with some sort of warning like "Membership Expired".

Can this be done, and if so could someone guide me in the right direction.

Create an event procedure for the form's Timer event similar to...

Me.ExpirationLabel.Visible = Not Me.ExpirationLabel.Visible

(set the TimerInterval to zero so the above will not run by default)

In the Current event of your form...

If Me.expdate < Date() Then
Me.TimerInterval = 500
Else
Me.TimerInterval = 0
Me.ExpirationLabel.Visible = False
End If

A word of advise though that flashing things at your user can be very annoying.
You might be better off simply changing the color of the expdate control rather
than flashing a separate label.
 
You can make a message flash by setting the form's TimerInterval property to
300 (say), then putting something like this in the Form_Timer event:

(untested)

if isnull (me![txtWarning]) then
me![txtWarning] = "*EXPIRED*"
else
me![txtWarning] = null
endif

Then have something like this in Form_Current:

if me![ExpiryDate] < date() then
' record has expired.
me.timerinterval = 300
else
' record has not yet expired.
me.timerinterval = 0
me![txtWarning] = null
endif

HTH,
TC
 
Back
Top