Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date calculation with months 1

Status
Not open for further replies.

Superguppie

Technical User
Jan 19, 2005
107
0
0
NL
hey there,

im trying to calculate a date let me explane:

when a product is buyed, an inventory will be made, we will in a table when the device is bought and howlong the garanty is for this product. also there is a checkbox that says: Garanty? Yes/No

so the table looks like this

Productnumber
Invoicenumber
Buy date
Garanty time ( In months, so for 1 year they fill in just: 12)
Garanty (in a query, this must look to the buy date and put there 12 months (why in months, because some products have 6 or 9 months thats different here in the netherlands. above. so if the buydate is 1-1-08 then the checkbox must uncheck if the Garanty is over. (this can maybe in an onLoad event when the mainform or this form is opened)

can someone explane how this is done.

Thanks in advance

Superguppie
 





Hi,
Code:
Where DateSerial(Year([buydate]),Month([buydate])+[Garanty time],Day([buydate])<Date()
is when guarantee is in effect


Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
thanks for the quick reaction, when i insert this in criteria in the query it tells me the syntax is wrong, i think this code must be put somewhere else???? also your code SoCallAccessPro is wrong syntax aswell.
 
ah Stupid, i just told it, put it in onload event.......

Lol gonna try that again:D
 
Thanks you both for reactions, i tried SoCalAccessPro's code and that works:D i also tried your code Skip.. and als o that works so thanks for the tips:D


Superguppie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top