Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Searching for a value in datasheet column

Status
Not open for further replies.

scubafrog79

Programmer
Oct 10, 2014
13
US
I was wondering how I can look through a datasheet that is a sub-form to find a record based on date. So when I open my form, it looks at the sub-form and loops through the records and when it finds a row with today's date, it changes the background and font color but puts it back to the normal background and font color when it's not today's date

In this example,the row where Mary is listed would change colors since today is the 27th of December 2019.

Access_tmu5ky.png
 
Do you really have a field named "Date". This is a function and should not be used as field or other object name.

You should be able to use conditional formatting.
Set the Expression Is to:
Code:
[Date Field Name]=Date()
And then set the background to kinda red.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Thanks, didn't realize Access had conditional formatting like Excel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top