Expiration Date Field Update Thingy

dynamix

Registered User.
Local time
Today, 23:56
Joined
Feb 9, 2005
Messages
38
Hello everyone.. I'm new :).

I'm working on a school database project and I am developing a Gym subscription/registration system.

Basically, once a user enters his/her personal info, they are taken to a second form where they can enter the subscription plan type (there are three plans).

Now, this is what I'm stuck on.. When a user enters a subscription start_date, I want the next field 'Exp._Date' to update to a year later, automatically.

So for example, if you enter 09/02/2005 in the start_date field, then the next field would automatically be filled with 09/02/2006.

Is it possible? And more importantly, how? I'm fairly new to DB's so please lay it in laymens ;).

Thanks guys.

PS: A screenshot of the form is located below:
 
Look up DateAdd in Access help

DateAdd("m", 12, [Start_Date])


Col
 
Good try but it doesn't work :(.

#Name?

Is what the caption is..
 
It doesn't work because you've entered the wrong name for Start date in the example Col gave you, replace it with your own field name
 
He included the right field name :(. It's Start_Date on mine too..
 
according to your first post it's start_date, not Start_Date, add an unbound textbox to your form and set it's control source to
=DateAdd("m", 12, [YourCorrectFieldName])
 
dynamix, It really seems academic to store this anyway, since you can calculate it on the fly when ever you need it.

kh
 
Store what? Sorry, I'm still learning... Could you explain what you mean KenHigg?

Thanks for all your replies guys!
 
You do have a field in you table named 'Exp._Date' don't you?

kh
 
Yeah, I do :).

ERMM.. Hey, it just worked. The original code posted solved my problem :D. It's rather wierd. At school we use Access 2000 and I'm pretty sure it didn't work there, but on my home PC (which I'm using now) it worked brilliantly.

Or did I just do it wrongly at school?? :p

Either way, thanks a bunch guys! Life savers :D.
 
Yeah, I do :).

ERMM.. Hey, it just worked. The original code posted solved my problem :D. It's rather wierd. At school we use Access 2000 and I'm pretty sure it didn't work there, but on my home PC (which I'm using now) it worked brilliantly.

Or did I just do it wrongly at school?? :p

Either way, thanks a bunch guys! Life savers :D.
 
But do you see why you may not have to store the exp date value at all?


kh
 

Users who are viewing this thread

Back
Top Bottom