Conditional formatting for recognizing birthdates

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

Guest

I have a report that is a roster for activities. It includes name, DOB,
dates of activity, etc. When someones birthday is during the time frame the
activity happens, I would like to have the DOB bolded. Any suggestions for
conditionally formatting this? I am using short date. I seem to be at a
loss....
Thanks!!
 
I have a report that is a roster for activities. It includes name, DOB,
dates of activity, etc. When someones birthday is during the time frame the
activity happens, I would like to have the DOB bolded. Any suggestions for
conditionally formatting this? I am using short date. I seem to be at a
loss....
Thanks!!

What version of Access?
What is the time frame you wish to use?

If you have Access 2000 or newer you can use the [DOB] control's
Conditional formatting property.

Select the [DOB] control.
click on Format + coditional formatting

as Condition1 select Expression Is.
In the box write

Month(DOB] = Month(Date())
Set the font to Bold

If you are using Access 97 or older, use the Report's Detail Format
event.

[DOB].FontBold = Month([DOB] ) = Month(Date)

will bold the [DOB] for all records of the current month.
 
Access 2000. The fields available are [DOB], [Date], and [EndDate]. The
Date and EndDate fields are the begining and ending dates of the activity. I
want to recognize the birthdate if the month and day falls between the
activity dates.
Thanks!!

fredg said:
I have a report that is a roster for activities. It includes name, DOB,
dates of activity, etc. When someones birthday is during the time frame the
activity happens, I would like to have the DOB bolded. Any suggestions for
conditionally formatting this? I am using short date. I seem to be at a
loss....
Thanks!!

What version of Access?
What is the time frame you wish to use?

If you have Access 2000 or newer you can use the [DOB] control's
Conditional formatting property.

Select the [DOB] control.
click on Format + coditional formatting

as Condition1 select Expression Is.
In the box write

Month(DOB] = Month(Date())
Set the font to Bold

If you are using Access 97 or older, use the Report's Detail Format
event.

[DOB].FontBold = Month([DOB] ) = Month(Date)

will bold the [DOB] for all records of the current month.
 
Access 2000. The fields available are [DOB], [Date], and [EndDate]. The
Date and EndDate fields are the begining and ending dates of the activity. I
want to recognize the birthdate if the month and day falls between the
activity dates.
Thanks!!

fredg said:
I have a report that is a roster for activities. It includes name, DOB,
dates of activity, etc. When someones birthday is during the time frame the
activity happens, I would like to have the DOB bolded. Any suggestions for
conditionally formatting this? I am using short date. I seem to be at a
loss....
Thanks!!

What version of Access?
What is the time frame you wish to use?

If you have Access 2000 or newer you can use the [DOB] control's
Conditional formatting property.

Select the [DOB] control.
click on Format + coditional formatting

as Condition1 select Expression Is.
In the box write

Month(DOB] = Month(Date())
Set the font to Bold

If you are using Access 97 or older, use the Report's Detail Format
event.

[DOB].FontBold = Month([DOB] ) = Month(Date)

will bold the [DOB] for all records of the current month.
Using Conditional formatting, set the Condition1 dropdown to:

FieldValue Is
Then select
Between [Date] and [EndDate]

BUT ...

Date is a reserved Access/VBA/Jet word and should not be used as a
field name.
See the Microsoft KnowledgeBase article for your version of Access:

109312 'Reserved Words in Microsoft Access' for Access 97
209187 'ACC2000: Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
321266 'ACC2002: Microsoft Jet 4.0 Reserved Words'

I suggest you change the field name 'Date' to something else, perhaps
'StartDate'
 
That's basically where I started, but that returns no results. It's looking
to also compare the year part of the activity dates (which is 2005) and the
year part of the DOB (varies depending on age 1985, 1988, 1994, etc.). I
just want to compare the month/day of [DOB],[Date], and [EndDate]. Sorry if
I'm not making myself clear. And yes, I will change the name of [Date].

fredg said:
Access 2000. The fields available are [DOB], [Date], and [EndDate]. The
Date and EndDate fields are the begining and ending dates of the activity. I
want to recognize the birthdate if the month and day falls between the
activity dates.
Thanks!!

fredg said:
On Mon, 11 Jul 2005 07:49:05 -0700, K.P. wrote:

I have a report that is a roster for activities. It includes name, DOB,
dates of activity, etc. When someones birthday is during the time frame the
activity happens, I would like to have the DOB bolded. Any suggestions for
conditionally formatting this? I am using short date. I seem to be at a
loss....
Thanks!!

What version of Access?
What is the time frame you wish to use?

If you have Access 2000 or newer you can use the [DOB] control's
Conditional formatting property.

Select the [DOB] control.
click on Format + coditional formatting

as Condition1 select Expression Is.
In the box write

Month(DOB] = Month(Date())
Set the font to Bold

If you are using Access 97 or older, use the Report's Detail Format
event.

[DOB].FontBold = Month([DOB] ) = Month(Date)

will bold the [DOB] for all records of the current month.
Using Conditional formatting, set the Condition1 dropdown to:

FieldValue Is
Then select
Between [Date] and [EndDate]

BUT ...

Date is a reserved Access/VBA/Jet word and should not be used as a
field name.
See the Microsoft KnowledgeBase article for your version of Access:

109312 'Reserved Words in Microsoft Access' for Access 97
209187 'ACC2000: Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
321266 'ACC2002: Microsoft Jet 4.0 Reserved Words'

I suggest you change the field name 'Date' to something else, perhaps
'StartDate'
 
Back
Top