Automatic Update

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
 
J

Jeanette Cunningham

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
 
R

Roger Bell

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.
 
J

Jeanette Cunningham

Yes, post your code.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
R

Roger Bell

Thanks again Jeanette,
Figured out how to use Elseif and everything fine, with gratitude to you.

Thanks again and keep well
Roger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top