How do I set up a repeating meeting in Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to build a patient scheduling program using Access 2003. I would
like to
setup a reoccuring function so that a patient is scheduled for the same day
and time
each week for 40 to 50 weeks
 
If an appointment consists of one record in an appointments table, get the
first date of the appointment and either the number of appointments or the
last date of the appointments. Now, establish a recordset and create a Do
Loop that adds a new record for each iteration. I would assume most of the
data in the record will be redundant, so one you have it all entered, you can
increment the date. Here would be the control loop.

dtmApptDate = Me.txtFirstApptDate

Do While dtmApptDate <= Me.txtLastApptDate

'Create the new record here
dtmApptDate = DateAdd("ww",1,dtmApptDate)
Loop
 
Dave's recommendation is right on if you want to first set the last
appointment date. If you want to set the number of followup appointments say
40, you can do it this way:

Dim I As Integer
Dim Db As DAO.Database
Dim Rst As DAO.Recordset
Set DB = CurrentDB()
Set Rst = DB.OpenRecordset("TblNameOfYourAppointmentTable")
For I = 1 To 40
Rst.Add
'Create the new record here
Rst!ApptDate = DateAdd("ww",I,Me!FirstApptDate)
'For other fields that needed to be added to the record use this
form
Rst!FieldName = Me!AppropriateFieldName
Rst.Update
Next

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 
Steve said:
Dave's recommendation is right on if you want to first set the last
appointment date. If you want to set the number of followup appointments say
40, you can do it this way:

Dim I As Integer
Dim Db As DAO.Database
Dim Rst As DAO.Recordset
Set DB = CurrentDB()
Set Rst = DB.OpenRecordset("TblNameOfYourAppointmentTable")
For I = 1 To 40
Rst.Add
'Create the new record here
Rst!ApptDate = DateAdd("ww",I,Me!FirstApptDate)
'For other fields that needed to be added to the record use this
form
Rst!FieldName = Me!AppropriateFieldName
Rst.Update
Next

PC Datasheet

--
This is to inform 'newbees' here about PCD' Steve:
http://home.tiscali.nl/arracom/whoissteve.html
Until now 3600+ pageloads, 2325+ first-time visitors (these figures are rapidly increasing)

Why is this ???
Because Steve is the ONLY person here who continues to advertise in the groups.

It is not relevant whether he advertised in *this* particular post or not...
==> We want him to know that these groups are *not* his private hunting grounds!

For those who don't like too see all these messages:
==> Simply killfile 'StopThisAdvertising'.
Newbees will still see this warning-message.

ArnoR
 
Back
Top