473,327 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Format form/report records

I have a form & report based on a query which shows details about
employees performance reviews (hire date, review date, review submital
date, etc). We do 90 day probation reviews as well and I want to be
able to indicate employees who have a hire date that is within 90 days
of the current date and highlight their records in the form and report
with a yellow background. How would this be best accomplished using
DateDiff or DateAdd?

Thanks in advance-

Scott
Nov 12 '05 #1
1 2141
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Supposing each employee record is in the report's Detail section:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

If DateDiff("d", Me!HireDate, Date()) <= 90 Then
Me.Detail.BackColor = vbYellow
Else
Me.Detail.BackColor = 16777215
End If

End Sub

On a form you would use the OnCurrent event procedure to set the
background color for whichever control or section you wish.

HTH,

MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP/oHBYechKqOuFEgEQKV8QCg0jQ5aVzkrIzPuoi7qCHDDN3zLYIA oP4h
G6N8d87VdZtHNnWFQ9LmM/jL
=VdnJ
-----END PGP SIGNATURE-----
Scott Sabo wrote:
I have a form & report based on a query which shows details about
employees performance reviews (hire date, review date, review submital
date, etc). We do 90 day probation reviews as well and I want to be
able to indicate employees who have a hire date that is within 90 days
of the current date and highlight their records in the form and report
with a yellow background. How would this be best accomplished using
DateDiff or DateAdd?

Thanks in advance-

Scott


Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: mark | last post by:
How do I get all fields on one page of a report? I have a report that has a column for each day of the week and 6 records for each day. I need each weekday's records returned on only one detail...
3
by: marwa mohamed | last post by:
salamo alikom hi all when i run report that includes image control linked to a field in the table that contains the image path(on the server)and the record source of the report contains over 30...
2
by: Paul Mendez | last post by:
I have a form that consists of 150 records and is still growing. there are times when I want to print a certain record of the form, say record 12. I go to file --> print and choose the page number...
3
by: Melissa | last post by:
What specifically causes the Format event of a report's section to fire? Thanks! Melissa
1
by: Peter | last post by:
Dear all, Could you give me a hint? a) I generate a report from a query table, then I want to use this report to show the total numbers of the customers who buy the goods. There is a string...
1
by: Tom | last post by:
In the Developers Handbook, Getz provides a way to create a survey report that displays either a line, Yes/No or multiple choice for each question. It's done by placing three controls (one for each...
1
by: Jimmy Stewart | last post by:
I have a continuous form with a list of items from a table. One of the fields in the table is "print". this allows the user to select items from the list on the form for printing in a report. on...
6
by: Dave | last post by:
On my form I have combo boxes. These combo boxes, after updating them, populate respective listboxes that are located below the combo boxes on the same form. I am trying to use a "generate...
6
by: MLH | last post by:
I have a small bitmap graphic on a report. I would like to set it's Visible property to True whe the value of a certain field on the report is True. Can I do that? I have tried in the OnFormat...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.