Setting relationships between two tables

S

smash46

Hi, I'm new to this forum. I'm having trouble understanding the relationships
even though I've read help.
I have 2 tables.
One is a date table with 2 fields (a month/day text field) and a field that
tells the day number in the calendar year e.g. 2/1; and 32

The other holds data for prescription info with the refill date.
I want to be able to know what the next refill date will be.

So in setting this up do I use the one to many?
Each prescription will have only one date but the date table has a date for
every day in the year.

Grateful for any help you can give me.
smash46
 
A

Arvin Meyer [MVP]

You do not need a date table. Instead simply calculate your next date using
the DateAdd() function. Here's an example from an old help file:

Dim FirstDate As Date ' Declare variables.
Dim IntervalType As String
Dim Number As Integer
Dim Msg
IntervalType = "m" ' "m" specifies months as interval.
FirstDate = InputBox("Enter a date")
Number = InputBox("Enter number of months to add")
Msg = "New date: " & DateAdd(IntervalType, Number, FirstDate)
MsgBox Msg
 

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