SQL hates me!

G

googoo gahgah

Hi,

I need a way to write a value to my table based on a deadline date of one
year. So, at the end of one year I want to use SQL to put a value in a field
which means end of year has been reached.

The table name is Projects, and the field name is EndOfYear. The form
control name which has the project date in it is named txtProjectDate. If I
don't figure this out then my name will be "JOBLESS", just kidding, I think
:-(
 
J

John W. Vinson

Hi,

I need a way to write a value to my table based on a deadline date of one
year. So, at the end of one year I want to use SQL to put a value in a field
which means end of year has been reached.

The table name is Projects, and the field name is EndOfYear. The form
control name which has the project date in it is named txtProjectDate. If I
don't figure this out then my name will be "JOBLESS", just kidding, I think
:-(

Well... you don't say what value you want to put into the field. "A value".

I'm GUESSING that you want it to be one year to the day after txtProjectDate?
If the ProjectDate is stored in your table, then (unless you want to be able
to edit and overwrite the deadline date) the End Of Year field should simply
not exist! You can instead use a textbox with a control source

=DateAdd("yyyy",1,[ProjectDate])

to calculate it on the fly.

Or you could run an Update query updating EndOfYear to the same expression.

Your message could also mean that you want EndOfYear to contain December 31 of
the project year, or it could mean something else, since we don't know your
design. More help please?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top