Dates In Table

Switchwork

Registered User.
Local time
Today, 03:10
Joined
Dec 1, 2003
Messages
81
DATEs on tables??

Hello switch here long time no write

My problem this week is DATES. I have a Job details table (I work for a courier company) where each day I have to enter the jobs that have been done the day before. At the moment I am entering the same date over and over and over again each time I enter a job. I want to know how I can sort it so when i go to enter a job yesterdays date will automatically be entered??

Can this be done??
I know how to put the date in for the actual day it is but not for the day before. Is there a way??

I would be most grateful if someone could let me know if this can be done or not. I am assuming it can as I have found expressions for all sorts of things on dates. So I'm hopeful that someone out there will have an idea on how to do it.

THANX
Switch a.k.a Clare
thankyou for answering.
 
Thankyou. Is that it??
I thought it would be really hard!!
Just goes to show doesn't it? You learn something new everyday!
Well You definetly do on this website and thats the truth. I have basically learnt how to design a database from Access books and subscribing to forums such as this.
You people have helped me seriously and I thank you so much for helping me and I mean that!!

Heres to a Merry Xmas to you all and Happy New Year. Heres also to more learning on this forum!!! Thank you all
 
Need help again!!!!!

Hello and thank you for the help I recently received on this topic. However I totally forgot one thing.
My original question was about where I have to enter jobs that have been done the day after the jobs have been completed.
I was given a perfectly wonderful answer that is working spectacularly.

But due to my forgetfulness i totally forgot that on a Monday I have to enter the Jobs done on a Friday and the odd jobs completed over the weekend (even though there is only a few jobs done at the weekend). So during the week I need the date set as yesterdays date but on a Monday I need it set at the previous Fridays date then Saturdays Date and then Sundays DAte. Is there a way of doing this by setting the default code someway????

Or can anyone think of an easier way of doing it??
I am totaly annoyed as I thought I had it sorted with the answer that Wayne (I think it was) gave me. Now I am totally lost again!!

There must be a way of doing something like this. Even if I can't set the Default value to do -3-2-1 at the beginning of the week and then have it change on a Tuesday there must be another way I can do it. If I sit down and have a good think bout it I may come up with something. In the meantime I would appreciate someones help.

THERe must be a way!!!??!!?? HELP:mad: :confused:
 
Defaultvalue: date() - Iif(weekday(date(),vbMonday)=1,3,1)

You may need to replace vbMonday by the integer, 2
and or may need to replace , by ;

Regards
 
NOT Sure??

Hello and nice one for the information on this problem I had. However I am not sure what you meant by

"Replace vbMonday by the integer, 2 or and may need to replace , by ;."

I get the bit about changing , to ;. but the vbMonday to integar I don't get at all. so If you could explain it in laymans terms I would be most grateful.

Thanx for your input though much appreciated. If you could clarify what you meant by that I will be on my way to doing it right I imagine.

Regards and Respect.
 
Defaultvalue: date() - Iif(weekday(date(),vbMonday)=1,3,1)

I have found that vbMonday doesnt allways seem to work, something with references....

so if above dont work try changing it to
Defaultvalue: date() - Iif(weekday(date(),2)=1,3,1)
or even
Defaultvalue: date() - Iif(weekday(date();2)=1;3;1)
or then again
Defaultvalue: date() - Iif(weekday(date();vbMonday)=1;3;1)

The last and first are the better ones (using vbMonday) thats all there is to it....

Regards
 
Thank you , thank you , thank you!!!

I am so very grateful for the time you have taken helping me in my minute of need.

Thanx again and Respect!!!
 

Users who are viewing this thread

Back
Top Bottom