Jumat, 18 Desember 2015

Re: [MS_AccessPros] Continuous form -- row colors

 

I did something like this by applying conditional formatting to EVERY field in the detail row of the form.
So in my case, all the text in a given row is either black or has a light red tint (wanted red to signal "no", wanted it still readable).
 
Refer to the following link (or another if you have one) for information on conditional formatting.
https://support.office.com/en-us/article/Change-the-appearance-of-a-control-by-using-conditional-formatting-6ba9e9fa-4347-4183-b335-44e43b05e22f#bmexpressionis

In my case (a good simple example), one of the fields displayed in each row is a true/false value named InclYN.
[I left the names of the fields the same as the Control Source and have had no problems. The link above strongly suggests not to do this. If I'd read that article when building this form I would have followed the suggestion. Don't want to break anything by trying to "fix" it at this point.]

What this looks like in specifying the Conditional Formatting control:
Condition 1 (only 1 condition in my case)
 Test on: "Expression Is"
Value for test: Not [InclYN]

Before the form is opened, the values of InclYN are set to "best guess" for selecting the appropriate rows.
The person using the form can click on the check box for InclYN and the color of all the text in that row changes.

Something like this might work for you.

Sigurd Andersen


On 12/16/2015 5:11 PM, Steve thaw5@suddenlink.net [MS_Access_Professionals] wrote:
 

I have a continuous form consisting of these fields: purchase order
number, item description, item quantity, item cost, date and other
fields. The underlying query is sorted by purchase order number
ascending. Each purchase order has a random number of items associated
with it. Some purchase order numbers are missing.

I'd like to set the background color to a light grey for every other
purchase order for all of the fields in the rows associated with that
purchase order. I have looped through a recordset and successfully
picked out the rows for which I want a light grey backcolor. I set the
FieldName.Backcolor property to the light grey color but I always end up
changing the backcolor of all of the rows. How do I restrict the
backcolor change to just the selected rows?

Steve


__._,_.___

Posted by: Sigurd Andersen <sigurd@solbakkn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (6)

.

__,_._,___

Tidak ada komentar:

Posting Komentar