The Banns of Marriage

  • Thread starter Thread starter ET
  • Start date Start date
E

ET

Hi

I am setting up a Church database but when a marriage date is set, the
Rector would like the dates that the Banns to be read in chuch to be
automatically stated. The database currently has a married date field
'MarriedDate' and fields 'Banns1', 'Banns2' and 'Banns3' need to be filled
automatically.

The rule is that for any married date in one month the Banns are to be read
on the first three Sundays of the previous month. It is the dates of these
three Sundays which will fill fields Banns1, Banns2 and Banns3

The year will also change if someone is getting married in January as the
Banns are read on the first three Sundays of December of the previous year.

Any suggestions how this can be done?

Thanks in anticipation
Evan
 
Hi Evan

Assuming you have a form with a field to enter the marriage date, for the
After Update event of that field use the following...

Private Sub MarriageDate_AfterUpdate()

Dim FirstOfPrevMonth As Date

FirstOfPrevMonth = DateAdd("d", 1 - DatePart("d", Me.MarriageDate), _
DateAdd("m", -1, Me.MarriageDate))

If Weekday(FirstOfPrevMonth) = vbSunday Then
Me.Banns1 = FirstOfPrevMonth
Else
Me.Banns1 = DateAdd("d", 8 - Weekday(FirstOfPrevMonth),
FirstOfPrevMonth)
End If

Me.Banns2 = DateAdd("d", 7, Me.Banns1)
Me.Banns3 = DateAdd("d", 7, Me.Banns2)

End Sub

I have assumed the controls on the form are named...
MarriageDate, Banns1, Banns2 & Banns3
so you may need to rename these to match your own.

Hope this helps

Andy Hull
 
Back
Top