473,325 Members | 2,308 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,325 software developers and data experts.

How do I make a "conditional Format" on a record in a subform

Dear NG,

I would like to format a record in a subform, dependent on a value in one
field.
If one field in the record I show in a subform (datasheet view) is true I
like to view that particular row in green, all other rows just as they are
normal. Is that possible ?

regards
Allan

Nov 12 '05 #1
6 5467
"Allan Koch" <al***@koch.dk> wrote in message
news:40***********************@dread16.news.tele.d k...
Dear NG,

I would like to format a record in a subform, dependent on a value in one
field.
If one field in the record I show in a subform (datasheet view) is true I
like to view that particular row in green, all other rows just as they are
normal. Is that possible ?

regards
Allan


Of course a record doesn't have any colour - it is the controls (the
textboxes, etc) on the form which can have a colour. With Access 2k onwards
you can simply use conditional formatting.

Open the subform in design view and highlight the textboxes you wish to
change colour. From the Format menu select Conditional Formatting and enter
an expression such as "MyField=10" and select the colour.
Fletcher
Nov 12 '05 #2
Hi Fletcher,

Thanks !
Yes I know a record doesn't have a colour.
I used your advise, the only thing is that I am not able to have the hole
line formatted in one solid colour because check box fields do not have the
"conditional format" available. Do you think there is a cure for that ? ( I
want it to look like, you have selected the hole record row, just in a
different colour than black)
regards
allan
"Fletcher Arnold" <fl****@home.com> wrote in message
news:bv**********@hercules.btinternet.com...
"Allan Koch" <al***@koch.dk> wrote in message
news:40***********************@dread16.news.tele.d k...
Dear NG,

I would like to format a record in a subform, dependent on a value in one field.
If one field in the record I show in a subform (datasheet view) is true I like to view that particular row in green, all other rows just as they are normal. Is that possible ?

regards
Allan
Of course a record doesn't have any colour - it is the controls (the
textboxes, etc) on the form which can have a colour. With Access 2k

onwards you can simply use conditional formatting.

Open the subform in design view and highlight the textboxes you wish to
change colour. From the Format menu select Conditional Formatting and enter an expression such as "MyField=10" and select the colour.
Fletcher

Nov 12 '05 #3
"Allan Koch" <al***@koch.dk> wrote in message
news:40***********************@dread16.news.tele.d k...
Hi Fletcher,

Thanks !
Yes I know a record doesn't have a colour.
I used your advise, the only thing is that I am not able to have the hole
line formatted in one solid colour because check box fields do not have the "conditional format" available. Do you think there is a cure for that ? ( I want it to look like, you have selected the hole record row, just in a
different colour than black)
regards
allan

Hi Allan
If you have your subform in datasheet view, then you probably have the least
flexibility in what it looks like. If you used the continuous forms view
then other possibilities are opened up such as placing shapes or many
transparent textboxes placed on one coloured one. However, on balance, I
still prefer the datasheet view for subforms and I would probably not use a
check box.
I would define a field in my query such as:
IIf([MyField]=1,"X",Null) AS TrueOrFalse
So that I could use a textbox to display an "X" rather than use a checkbox.
Of course, you then have to write code to allow updating. Perhaps someone
else might have an imaginative suggestion and Stephen Lebans is a likely
candidate - you could try his website at
http://www.lebans.com/

Fletcher
Nov 12 '05 #4
Hi Fletcher,
Very useful information.
An other question, a little related.
My subform contain a lot of fields, and I really would like to keep the
first column locked, meaning it will stay in pos. 1 when I scroll sideways
with the other fields. Is that possible ?
Regards
Allan
"Fletcher Arnold" <fl****@home.com> wrote in message
news:bv**********@sparta.btinternet.com...
"Allan Koch" <al***@koch.dk> wrote in message
news:40***********************@dread16.news.tele.d k...
Hi Fletcher,

Thanks !
Yes I know a record doesn't have a colour.
I used your advise, the only thing is that I am not able to have the hole line formatted in one solid colour because check box fields do not have the
"conditional format" available. Do you think there is a cure for that ?

( I
want it to look like, you have selected the hole record row, just in a
different colour than black)
regards
allan

Hi Allan
If you have your subform in datasheet view, then you probably have the

least flexibility in what it looks like. If you used the continuous forms view
then other possibilities are opened up such as placing shapes or many
transparent textboxes placed on one coloured one. However, on balance, I
still prefer the datasheet view for subforms and I would probably not use a check box.
I would define a field in my query such as:
IIf([MyField]=1,"X",Null) AS TrueOrFalse
So that I could use a textbox to display an "X" rather than use a checkbox. Of course, you then have to write code to allow updating. Perhaps someone
else might have an imaginative suggestion and Stephen Lebans is a likely
candidate - you could try his website at
http://www.lebans.com/

Fletcher

Nov 12 '05 #5
"Allan Koch" <al***@koch.dk> wrote in message
news:40***********************@dread16.news.tele.d k...
Hi Fletcher,
Very useful information.
An other question, a little related.
My subform contain a lot of fields, and I really would like to keep the
first column locked, meaning it will stay in pos. 1 when I scroll sideways
with the other fields. Is that possible ?
Regards
Allan

Sure - this is very easy. Highlight the column in datasheet view and from
the Format menu select Freeze Columns.
Fletcher
Nov 12 '05 #6
Great, Thanks again.
I was looking in Format at the Top menubar :-(
Regards
Allan
"Fletcher Arnold" <fl****@home.com> wrote in message
news:bv**********@hercules.btinternet.com...
"Allan Koch" <al***@koch.dk> wrote in message
news:40***********************@dread16.news.tele.d k...
Hi Fletcher,
Very useful information.
An other question, a little related.
My subform contain a lot of fields, and I really would like to keep the
first column locked, meaning it will stay in pos. 1 when I scroll sideways with the other fields. Is that possible ?
Regards
Allan

Sure - this is very easy. Highlight the column in datasheet view and from
the Format menu select Freeze Columns.
Fletcher

Nov 12 '05 #7

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

Similar topics

5
by: Geoffrey | last post by:
Hope someone can help. I am trying to read data from a file binary file and then unpack the data into python variables. Some of the data is store like this; xbuffer:...
0
by: JD | last post by:
While reading through the "shortcuts" topic in the help, I saw that there's a "Format Document" option - CTRL+K, CTRL+D. Cool... so I go into a .cs source file (this is a winforms project) and hit...
10
by: John Smith | last post by:
After reading C# documentation the Conditional attribute seemed the way to go, but after inspecting the IL it seems those methods are still there and I imagine the CLR removes them. Using #if DEBUG...
3
by: ARZ | last post by:
Hi How do I include DLLs based on a condition. Eg., there are 2 DLLs 'Oracle.dll' and 'SQL.dll'. I need to include ANYONE of the DLLs based on a value. Is it possile in C# Thanks in advance ARZ
16
by: Al Reid | last post by:
First, I'm using vb2005. I have a string that is read from a barcode reader into a TextBox. The string is 6 characters long and represents a date (mmddyy). I want to display it to the user in a...
1
by: Marek | last post by:
I use VS2005 with framework 2.0 and I just found a behavior I consider odd. Here is the code that illustrates th eproblem: public static void MethodA() { MethodB() } #if DEBUG
5
by: veaux | last post by:
I'm thinking this is easy but can't get it. I have a table with following: Table1 Date 1/1/2007 Table2 Type 0107 (This is MMYY of above) So I'm having trouble using a query to turn the...
1
by: Christian Welzel | last post by:
Hi there! Currently i'm thinking about how to solve this problem: if (t3lib_div::int_from_ver(phpversion())<5000000) { // php4 class tx_lib_object extends tx_lib_selfAwareness {...} // }...
2
by: stainless | last post by:
I know this is probably simple but I cannot find a method of converting a date string into a format that matches the DatePicker format in C# eg string "20080131" converted to "31 January 2008" ...
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...
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)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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.