create records in a sub-form automatically

D

David Clifford

I am creating a database to manage medical visits to clients and when the
client is first referred to me I want to enter their details and then have a
series of visits created automatically based on time increments from their
date of birth i.e. at 6 weeks, 3 months, 9 months 2 years and 4 years. This
will be used to send reminders to them that a visit is due

thanks
 
A

Arvin Meyer [MVP]

You should not be creating records automatically. What you can do is run a
query based on DOB and generate an email based upon that. Running that query
every day will send all the emails. I rather doubt that your auto-generated
appointments will be kept most of the time anyway, as patients will have
moved, changed physicians, etc. Instead, build them from the query (1 at a
time) as needed, then alter them as the patient's parent calls to confirm
the appointment, or better yet, create the appointment as the parent calls
in. The expressions you need for the query use the DateDiff function. For 6
weeks use something like:

SELECT DateDiff("w",[DateField],Date()) AS ApptDate
FROM tblMyData
WHERE DateField Is Not Null AND DateDiff("w",[DateField],Date()))>=6;

Substituting your field and table names.
 

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