473,320 Members | 1,707 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,320 software developers and data experts.

Conditional formatting

Can we do conditional formatting in queries ? for example in the below image (customers query) can we highlight "owner" & "purchasing manger" with different color under Job title column ?
If yes, how to do it .

Jul 30 '14 #1
6 2174
Stewart Ross
2,545 Expert Mod 2GB
The presentation of queries does not provide any means to do what you ask. There is no conditional formatting available in Access as such, and even if there was it would not allow you to do what you ask.

You could try using rich-text fields in forms (using the query grid for output will not help you here), but this is for the most part likely to involve VBA code rather than a query. I suspect it would be far from a simple requirement to implement, though what you have told us so far is too general for me to be sure about this.

As the rich-text version would involve markup of words and so on you could look instead at providing, say, some form of HTML export in which you can format the output text in whatever way suits you.

Either way, it is not available directly from within the built-in Access facilities without some form of intervention by you to either mark-up specific words and phrases or replace the text concerned with marked-up versions for display as rich text in forms.

-Stewart
Jul 30 '14 #2
twinnyfo
3,653 Expert Mod 2GB
Conditional Formatting is only available on Forms and Reports in MS Access.
Jul 30 '14 #3
Stewart Ross
2,545 Expert Mod 2GB
The conditional formatting which Twinnyfo mentions, like Excel's, allows users to change, for example, background colours and so on. It cannot mark up and change individual words within a piece of text, which is really nothing to do with conditional formatting at all.

-Stewart
Jul 30 '14 #4
zmbd
5,501 Expert Mod 4TB
Stewart is correct about highlighting individual words within the field.

As for TwinnyFo's suggestion here's some information for ACC2007/2010 for conditional formatting within forms and reports

--- http://office.microsoft.com/en-us/ac...010208133.aspx
As you can see here you can change the font, font colour, background etc; however, it applies to the entire field


--- http://msdn.microsoft.com/en-us/libr...ice.14%29.aspx
Same thing here with the fonts, background, etc...

Now there is as of ACC2007 a rich text field... careful with these as they are not compatible with other database types and expect will cause more heartburn than solution:
http://office.microsoft.com/en-us/ac...010014097.aspx

Not sure how to do this with vba and the update would be manual/coded.
Jul 31 '14 #5
Thank u all for your inputs
Jul 31 '14 #6
NeoPa
32,556 Expert Mod 16PB
In simple terms - No. It cannot be done from a QueryDef.

However, if you're prepared to use a continuous form (or report) to show the query data then it can be done - using Conditional Formatting.

To use Conditional Formatting you select the control which displays the [Job Title] field (EG. [txtJobTitle]) then :
  • If using version 2003 or earlier - Select Format (menu) | Conditional Formatting and enter your criteria.
  • If using version 2007 or later - Select (J)Format (ribbon) | Conditional Formatting and enter your criteria.

As Stewart pointed out though, only the whole control gets formatted when this is done. From the data you posted this shouldn't be a problem in this instance, but is worth bearing in mind.
Aug 3 '14 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jouke Langhout | last post by:
Hello all! For quite some time now, I've got the following problem: Access won't close properly when a user closes the application. An ACCESS process stays active and that process can only be...
4
by: Bradley | last post by:
I have an A2000 database in which I have a continuous form with a tick box. There is also a text box with a conditional format that is based on the expression , if it's true then change the...
8
by: Dimitri Furman | last post by:
Given: Access 2002/2003 A subform in datasheet or continuous view, placed on a tab page (this last may or may not matter) Conditional formatting applied to some controls on the subform - format...
2
by: Von Bailey | last post by:
I have a form where the conditional formatting is set on some fields to bold if certain conditions are met. However, when the conditions are met some of the data that is to bold is either not...
2
by: Sara | last post by:
The problem: Conditional formatting bold, red when field Value < date() sets the field background to white - always - whether condition is met or not. I want the field unfilled and just red/bold...
5
by: Andrew Chanter | last post by:
Does anyone know a way you can use conditional formatting to create a banded style view as is commonly seen on the internet. (In othe words the first record appears on a gray background, the 2nd...
1
by: GGerard | last post by:
Hello Is there a way to use a variable in the Conditional Formatting of a Textbox? Example : I want the background of a textbox in a continuous form to change color when the value of...
8
by: Typehigh | last post by:
I have many text fields with conditional formatting applied, specifically when the condition is "Field Has Focus". Without any events associated with the fields the conditional formatting works...
4
by: midlothian | last post by:
Hello, I have conditional formatting set up on a subform based on a calculated value in the underlying query. For instance, if Sales are >$1000, the query displays "Yes," otherwise it displays...
2
by: Filips Benoit | last post by:
Dear All, Access 2003 adp on SQL_server 2005 A continious form showing 1 month based on table 'CALENDAR_MONTH_GRID' and fill with a SP. Fields: Companyname, Day1, day2, etc. The value in the...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.