John:
I would be very interested in seeing how you are using Access in your
genealogical work. I have fairly recently started archiving 2500 letters and
diaries from relativs dating back to 1860, going forward to 1965. I wonder if
Access would be more ideal than Word for cross referencing names, places,
dates, etc. Could you show me a link to your table? Any thoughts on this John?
I use separate fields for day, month and year and then combine them into a date for reports.
See:
http://www.psci.net/gramelsp/temp/naturalization.jpg
It uses this function to make date for display on form and report.
' update all date labels when browsing between records
Me.lblBirthDate.Caption = StringDate(BirthDay, BirthMonth, BirthYear, False)
Me.lblCourtDate.Caption = StringDate(CourtDay, CourtMonth, CourtYear, False)
Me.lblEmbarkDate.Caption = StringDate(EmbarkDay, EmbarkMonth, EmbarkYear, False)
Me.lblArrivalDate.Caption = StringDate(ArrivalDay, ArrivalMonth, ArrivalYear, False)
'-------------------------------------------------------------------------------
Public Function MonthString(intMonth As Integer) As String
'-------------------------------------------------------------------------------
Dim strAllMonths As String
Dim intItemLen As Integer
If intMonth > 0 Then
strAllMonths = "JanFebMarAprMayJunJulAugSepOctNovDec"
intItemLen = 3
MonthString = Mid$(strAllMonths, intItemLen * (intMonth - 1) + 1, intItemLen)
End If
End Function
'-------------------------------------------------------------------------------
Public Function StringDate(intDay As Variant, _
intMonth As Variant, _
intYear As Variant, _
isBlank As Boolean) As String
'-------------------------------------------------------------------------------
' converts an integer day, integer month, integer year into a
' string "dd mmm yyyy", ex: 13 Jun 1921.
' use:
' Me.lblBirthDate.Caption = StringDate(BirthDay, BirthMonth, BirthYear, False)
' must have at least the year
If Nz([intYear], 0) > 0 Then
StringDate = IIf((Nz([intDay], 0) = 0), "", Str(Nz([intDay])) & " ") & _
MonthString(Nz([intMonth], 0)) & Str(Nz([intYear], 0))
Else
' if integer year is null or 0 then return one of the
' these strings depending on whether isBlank is True or False
If isBlank = False Then
StringDate = "none"
Else
StringDate = ""
End If
End If
End Function