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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with conditonal expression

Status
Not open for further replies.

kimmole

Technical User
May 9, 2002
49
GB
GET A DATE FIELD TO UPDATE TO ONE YEAR ABOVE WHER IT IS ALREADY?

i'm running an end of tax year update.... so loads of things are happening at once, ....so far they all work but i need the date 05/04/YYYY to change to 05/04/YYY+1 ......(datepart YYYY +1)?
pa i'm running an update query so what is th expression to put in the update field?


also i want to conditionaly open a form based on the date at startup..... conditional in the autoexec macro
sort of....
iif (datepart &quot;m&quot; =04 and datepart &quot;d&quot; >3and<10, run macro/code, else go to next.....

this needs to be bases on the machine time, not a date in a table..... hmmmmm...though i spose i could pop open a single field query based on a table and run the conditional through that.....

rammble onnn


thanks in anticipation.... kimbo:))))))) mr macro....sorry, not clever enough for code.
 
How about using a &quot;DateAdd&quot; function. The syntax is DateAdd(&quot;yyyy&quot;,1,{yourdate}). This should add 1 year to your date.
 
ta for that ....i'll giv it a try...
sorry to be a dummy but i have to make do whith what i know and what i can glean from guys like you

best.... kimbo:)))
 
just tried it...... no go....
ive got :
DateAdd(&quot;yyyy&quot;,1,[COMPANYNAMElst]![TAX YEAR TO])
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top