A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

expression for contains



 
 
Thread Tools Display Modes
  #1  
Old January 8th, 2010, 05:33 AM posted to microsoft.public.access.reports
Rose
external usenet poster
 
Posts: 262
Default expression for contains

When doing a conditional formatting in a report and you want to type the
expression contains "USA" in data for the field of [Country]. What
expression would you use?
--
Rose
  #2  
Old January 8th, 2010, 05:54 AM posted to microsoft.public.access.reports
Gina Whipp
external usenet poster
 
Posts: 3,500
Default expression for contains

Rose,

Try... [County] Like "*USA*"

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Rose" wrote in message
...
When doing a conditional formatting in a report and you want to type the
expression contains "USA" in data for the field of [Country]. What
expression would you use?
--
Rose



  #3  
Old January 8th, 2010, 05:55 AM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default expression for contains

Rose wrote:

When doing a conditional formatting in a report and you want to type the
expression contains "USA" in data for the field of [Country]. What
expression would you use?



You can use the Expression Is option with an expression like
either:
InStr([field], "USA") 0
or
[field] Like "*USA*"

--
Marsh
MVP [MS Access]
  #4  
Old January 8th, 2010, 07:28 AM posted to microsoft.public.access.reports
Rose
external usenet poster
 
Posts: 262
Default expression for contains

I tryed to input the expression in the Conditional Formatting Field under
Condition 1 but it does not seem to work any ideas?
--
Rose


"Marshall Barton" wrote:

Rose wrote:

When doing a conditional formatting in a report and you want to type the
expression contains "USA" in data for the field of [Country]. What
expression would you use?



You can use the Expression Is option with an expression like
either:
InStr([field], "USA") 0
or
[field] Like "*USA*"

--
Marsh
MVP [MS Access]
.

  #5  
Old January 8th, 2010, 02:30 PM posted to microsoft.public.access.reports
John Spencer
external usenet poster
 
Posts: 7,815
Default expression for contains

Did you include the brackets around the FIELD name? You must do so or the
expression will compare the string "Country to the string "*USA*" and always
return false.

"Country" Like "*USA*"
when you want
[Country] Like "*USA*"

Also make sure you have the field Country in the record source for the report
and that the field is named Country.


John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

Rose wrote:
I tryed to input the expression in the Conditional Formatting Field under
Condition 1 but it does not seem to work any ideas?

  #6  
Old January 8th, 2010, 04:49 PM posted to microsoft.public.access.reports
Gina Whipp
external usenet poster
 
Posts: 3,500
Default expression for contains

Rose,

I just tested mine and it works... did you try it?

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Rose" wrote in message
...
I tryed to input the expression in the Conditional Formatting Field under
Condition 1 but it does not seem to work any ideas?
--
Rose


"Marshall Barton" wrote:

Rose wrote:

When doing a conditional formatting in a report and you want to type the
expression contains "USA" in data for the field of [Country]. What
expression would you use?



You can use the Expression Is option with an expression like
either:
InStr([field], "USA") 0
or
[field] Like "*USA*"

--
Marsh
MVP [MS Access]
.



  #7  
Old January 8th, 2010, 05:10 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default expression for contains

Rose wrote:

I tryed to input the expression in the Conditional Formatting Field under
Condition 1 but it does not seem to work any ideas?



Also make sure you selected the Expression Is option.

--
Marsh
MVP [MS Access]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:00 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.