Author |
Topic |
alec77
Starting Member
5 Posts |
Posted - 2003-01-13 : 11:14:55
|
I have 3 tables: date, status, future date.I want, for every month, "future date" is updated to the following month when date is more then the 21th of every month and when status is equal to 70%.Example:Date=22/01/2002Status=70%Future Date--> FebruaryThank you! |
|
mr_mist
Grunnio
1870 Posts |
Posted - 2003-01-13 : 11:51:09
|
UPDATE yourtableSET [date] = dateadd (m, 1, [date])where status = 70 andday ([date]) > 21?-------Moo. |
 |
|
alec77
Starting Member
5 Posts |
Posted - 2003-01-14 : 03:39:12
|
I have a little problem...Where have I to insert the code?Thanks... |
 |
|
mr_mist
Grunnio
1870 Posts |
Posted - 2003-01-14 : 03:43:25
|
quote: I have a little problem...Where have I to insert the code?Thanks...
I'm not sure what you mean. Please explain the problem. You can run the code from Query Analyzer, or anything else that supports SQL...-------Moo. |
 |
|
rihardh
Constraint Violating Yak Guru
307 Posts |
Posted - 2003-01-14 : 03:48:05
|
Hey Alec77,next time don't miss school skateboarding or whatever and do your homework alone! |
 |
|
alec77
Starting Member
5 Posts |
Posted - 2003-01-14 : 03:52:18
|
I mean, Have I to insert the code in properties-->event of the control "future date" or not? |
 |
|
mr_mist
Grunnio
1870 Posts |
Posted - 2003-01-14 : 03:59:55
|
Sorry I have no idea what a properties-->Event control is. I was labouring under the misconception that you had a problem with the SQL, not with some programming language.-------Moo. |
 |
|
alec77
Starting Member
5 Posts |
Posted - 2003-01-14 : 04:09:47
|
I try to explain again the problem.I have 3 controls(date,status,future date) in a form(Access2000) and I want the control "future date" shows a value based on values of the controls date and status. IF Date=22/01/2002 AND Status=70% Then Future Date--> February I know I have to insert a code but I don't know where!Please help me!Very thanks!!! |
 |
|
mr_mist
Grunnio
1870 Posts |
Posted - 2003-01-14 : 04:17:58
|
Ok I do not know about this access form so I will let someone else answer it.-------Moo. |
 |
|
rihardh
Constraint Violating Yak Guru
307 Posts |
Posted - 2003-01-14 : 05:12:39
|
Oh man Alec77, you're really something!For the sake of getting rid of your silly question:PRESS Alt + F11P.S.This advice comes for free: READING BEFORE DOING! |
 |
|
|