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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CF Expression Help

Status
Not open for further replies.

xmeb

Technical User
Jun 5, 2013
89
Hi:

I have searched on Google for what I want to do but I have found nothing that is exactly the same so far.

On a report I have a subreport that has a "PrimiaryLocation" text box. I use the following in the subreport query criteria for my field "DDate" to show primary locations for the last five days which works fine.


Code:
>=DateAdd("d",-1,Date())-5

What I would like to do using CF is to have primary locations that match todays date be a different color and those that are two days old be a different color.

Thanks,

xmeb
 
What is Print Preview mode? I right click the table and select open, is that what you mean? I just created a new blank report and put "DDate" and "PrimaryLocation" text boxes on it and put in the same conditional formatting that is giving us trouble and it still does not work. However, other types of conditional formatting work fine. Thanks.
 
I checked it in Print Preview.

[DDate]>Now()
 
File is confidential and too big to be stripped and sent. I have been doing research and found that controls and fields cannot have the same names for conditional formatting to work which mine did. I changed them but it still does not work. Thanks for all your help.
 
Have you tried creating a very small sample database with just the records and report needed to test?

You haven't created a user-defined-function named DDate() have you?

Duane
Hook'D on Access
MS Access MVP
 
I will create the small database as you suggested tomorrow.

I do not think I have created a user-defined-function named DDate() but I will search for it.

Thanks.
 
I built a database with a table (two fields), a query, and a report. I used "DDate" and several other field names and it does not work. Other types of conditional formatting work fine.
 
Yes, the test one I built I can share. How is that best done? Thanks.
 
There are a number of file sharing sites like the one mention at the bottom of the reply screen. You can also find my email in the Hook'D on Access web site in my signature.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top