Using MS Access/MS Access - Date Driven Database
Expert: Scottgem - 2/3/2005
QuestionI'm setting up a database to store deadline times for a small Newspaper. All of the actual times are stored in one table, and the deadline times are stored in another table. I am using the day of the week (Monday...) as the relationship. Which makes sense because the deadlines change every week day (7 sets of them).
I made the Day (1/1/01) the unique key. I need to automate the database so it will add a day (record) to the "actual times" table at 10:00 am the next day. I hope this makes more sense.
Thanks,
Paul
-------------------------
Followup To
Question -
My unique key is today's date. Is there anyway I can have it automatically add days. As it adds days I also need it to write the weekday on the second column.
Thanks.
Answer -
I'm not sure what you mean by add days. Can you be more specific. Or check out the DateAdd function, which may do what you want.
You do NOT want to store the Weekday in your table. As a general rule we do not store calculated values and weekday is a calculation based on a date. If you want to display the weekday on forms or reports, just set a control's data source to:
=Format([datefield],"dddd")
If you just want the day abbreviation use "ddd".
HTH
Scott<>
AnswerI don't see where the day of the week is a relationship. I still think you don't have to store that. If you want to automate this you run an append query and use an expression like this:
NewDate: [DateField] + 1.416667
That shoulf = 10Am of the day after whatever date is in [Datefield]
HTH
Scott<>