Increase the Date automatically for each entry in a table

G

Guest

I am designing a database to automatically calculate the date that a student
needs to take an exam. I will then go back into the database after the
student actually takes an exam and put in the actual date that the exam was
taken.

The problem that I am having is trying to come up with how to get the dates
for each exam in the table to increase by 7 days. The 1st exam to be taken
needs to be 7 days after the Term Start Date (which is located in the Student
table) and all the rest of the exams need to be increase by 7 days from the
prior exam.

Thanks in advance for any help that you can give.
 
M

Michael Gramelspacher

kda1234 said:
I am designing a database to automatically calculate the date that a student
needs to take an exam. I will then go back into the database after the
student actually takes an exam and put in the actual date that the exam was
taken.

The problem that I am having is trying to come up with how to get the dates
for each exam in the table to increase by 7 days. The 1st exam to be taken
needs to be 7 days after the Term Start Date (which is located in the Student
table) and all the rest of the exams need to be increase by 7 days from the
prior exam.

Thanks in advance for any help that you can give.
and how do you propose to handle weekend days, holidays, Thanksgiving
break, Spring break, etc.
 
G

Guest

Can't get any simpler! You answered your own question without knowing it.
The people at MS thought of you and created the DateAdd Function.

The synthax for your purpose should be
DateAdd("d",7,Me.DateControlName)

Simply lookup DateAdd in the VBE Help file for more info and examples.
 
G

Guest

This might sound strange but we are not taking in consideration any holidays,
weekends, breaks, etc. in the calculation for the exam dates.
 
G

Guest

Apparently, I don't get it. I look in VBE help file and it gave me little
bit of info and one example on writing code for the function but that's about
it.

I went in to the query that I had been experimenting with and used the
Function but that didn't give me anymore than just 7 days after the Term
Start Date for every exam.

I need to have every entry in the table to have it's own date calculated
automatically due to the fact that not every course has the same number of
exams and not every student is taking the same number of courses.

I am fairly new to creating databases and am not sure where to go from here.
Again, thanks in advance for any help you can provide.
 

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