REPOST: Conditional Formatting Question

  • Thread starter Thread starter James
  • Start date Start date
J

James

Hello I have had a look at that conditional Formatting
Page of Stephen Lebans site. I cannot find out though how
to get Access to recognise that my record is Odd or Even..

Once I have done that I would need to apply conditional
Formatting to it...

Could someone please assist in taking me through what I
would need to do for this please as I have not done it
before...

This is to be done with continuous forms view. :-)

Many Thanks

James
 
Hello I have had a look at that conditional Formatting
Page of Stephen Lebans site. I cannot find out though how
to get Access to recognise that my record is Odd or Even..

Put a calculated field in the QUery upon which the form is based:

DCount("*", "[query name]", "[sortfield] <= " & [sortfield]) MOD 2

This will dynamically count which record this is (assuming you have
the records sorted by [sortfield] and there are no ties); MOD 2 will
return 0 for even values, 1 for odd.
 
Ok many thanks for your response John...

I have just 3 questions around this...

one what Query would I need to create?

How do I apply conditional formatting to what is going on?

Where do I put the DCount expression?

Many Thanks

James

-----Original Message-----
Hello I have had a look at that conditional Formatting
Page of Stephen Lebans site. I cannot find out though how
to get Access to recognise that my record is Odd or
Even..

Put a calculated field in the QUery upon which the form is based:

DCount("*", "[query name]", "[sortfield] <= " & [sortfield]) MOD 2

This will dynamically count which record this is (assuming you have
the records sorted by [sortfield] and there are no ties); MOD 2 will
return 0 for even values, 1 for odd.


.
 
Ok many thanks for your response John...

I have just 3 questions around this...

one what Query would I need to create?

I have no idea since I do not know in the least what information you
want to report. You'ld create a Query selecting the data that you want
on the report from one or more tables, and use that Query as the
Recordsource for the report.
How do I apply conditional formatting to what is going on?

Open the Report in design view; select the field or fields that you
want to "greenbar"; and select Format... Conditional Format from the
menu.
Where do I put the DCount expression?

In a vacant Field cell in the Query.
 
The information I am wanting to report is the results of a
search previously created...

How can I achieve this... At the moment the results are
displayed on the form... and so its easier on the eyes I
would like it to have two colours....

In your DCount Expression you mentioned a query name....
and a sort field...

What query would I be needing for this to go in? and the
sort field I would presume is the field I wish to sort??
or would it be how I wish to sort the records like in
acending order?

Many Thanks

James
 
Back
Top