Automatic Update

  • Thread starter Thread starter Roger Bell
  • Start date Start date
R

Roger Bell

_I have two fields on a form, namely "Registered" (Yes/No field) and "Expiry
Date" (short date field).

What i would like is when the form is opened from a control button, if the
Expired date is less than Now, then the Registered Yes/No box will be
unticked automatically.

Could anyone kindly tell me where I would write an Event Procedure and the
Code for this command?

Thanks for any help
 
Hi Roger,

you can use the current event which will fire after the form opens and every
time the user moves to another record.

If Me.ExpiryDate < Now Then
Me.Registered = False
Else
Me.Registered = True
End If


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
Thanks very much for helping a novice, Jeanette

Can you use 2 If statements in the same current event. Tried, but the
second If Bombed out. Any clues would be appreciated and thanks for your
valuable time.
 
Yes, post your code.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
Thanks again Jeanette,
Figured out how to use Elseif and everything fine, with gratitude to you.

Thanks again and keep well
Roger
 
Back
Top