You are here:

Using MS Access/MS Access - Date Driven Database

Advertisement


Question
I'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<>

Answer
I 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<>

Using MS Access

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scottgem

Expertise

I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.

Experience

I've been designing databases for over 15 years working with dBase, FoxPro, Approach and Access.

Organizations
Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

©2012 About.com, a part of The New York Times Company. All rights reserved.