Hopefully a simple question for you....

stuart_adair

Registered User.
Local time
Today, 07:18
Joined
Jan 13, 2009
Messages
57
Hi Folks

Hope everyone is keeping well.

I've got a simple form running with a tick-box called field called, "Paid".
When the box is ticked I want the form to update another field called, "Expiry" to be 1 calendar month in the future.

As usual I'm struggling ;)

Stu
 
Can you be more specific about what you mean by "1 calendar month"?

Do you just want to add 30 days, or do you want to go to the same calendar day of the next month? If the latter, then what do you want to happen of the following month does not have the same number of days (i.e. if today was August 31st then would you want Sept 30th? Oct. 1st?)
 
Until you have been specific about what you mean by "1 calendar month"? and other more qualifed members take over, here is my method based on 28 days .

Private Sub PAID_BeforeUpdate(Cancel As Integer)
If Me.PAID = -1 Then
Me.Expired = Date + 28
Else: Me.Expired = ""
End If
End Sub



You could use the now() in place of date function which would give you date plus hour and minutes .

ensure the expired field is formatted date




 

Users who are viewing this thread

Back
Top Bottom