By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,361 Members | 3,185 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,361 IT Pros & Developers. It's quick & easy.

Form Datasheet Formatting

P: n/a
How does Stephen Lebans make the datasheet row color
change by clicking a row's check box field?

I cant find any code associated with the form, and I
cant tell if you have created a class on the form or
not, or even "sub classed" the form or check box.
Is there a dll that was pre-loaded?
All I can do is guess....
Can you let me know how you do it?

TIA

Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On 21 Dec 2004 05:15:36 -0800, ce*******@yahoo.com wrote:

I didn't check his code, but it is probably done declaratively using
Format / Conditional Formatting.

-Tom.
How does Stephen Lebans make the datasheet row color
change by clicking a row's check box field?

I cant find any code associated with the form, and I
cant tell if you have created a class on the form or
not, or even "sub classed" the form or check box.
Is there a dll that was pre-loaded?
All I can do is guess....
Can you let me know how you do it?

TIA


Nov 13 '05 #2

P: n/a
Re: A2KConditionalFormattingVer27.mdb

I downloaded his sample database, and the field 'format' property was
the first thing I checked. That's why I assumed it must be code. But I
cant find anything. It will be nice if it's something simple that I'm
overlooking, but I suspect not. Only Stephan knows.
I appreciate what he's done, I think it's fabulous, but I can't use it
if I dont know the specs. or how to manipulate it.

I also experimented with the check box and the associated text boxes.
There seems to be some kind of awareness between them.

The check box can be any new check box from the 'toolbox' tool bar,
but....it's name MUST be "txtcusActive".

The text box has to be a COPY of the one used in the sample database.
It's name can be anything...
I also noticed if you use the format painter on a new text box, it
inherits the properties of the sample db text box.

The text box seems to be aware of the 'txtcusActive' check box state
and responds by changing color.

If I haven't overlooked anything, this tells me that the TEXT BOX is
sub-classed or whatever the process it called when you take a standard
windows control and add more funtionality to it.

I'd love to use it, but if I cant manipulate the color or how it
responds, I just simple cant. It's an excellent trick, though.
Still waiting for an answer...

Nov 13 '05 #3

P: n/a
My apologies to all,
after considerable experimentation and research, I have found the
issue.

In 2000 ( I'm not sure of 97 or below)
Each text box and combo box has a 'FormatConditions' collection and in
the collection
you can store a 'FormatCondition' object.
Each object stores the 'conditions' in which the control may change its
format. Simple.
Even simpler....Click the control (text or combo)...then click the menu
'Format | Conditional Formatting...'
There it is, plain and simple to use.

See 'FormatCondition' object in Access 2000 help.
I suspected it would be simple...sorry 'bout that!

Nov 13 '05 #4

P: n/a
Since the sample MDB is to demonstrate the use of Conditional Formatting
I thought it was safe to assume that inquiring minds would at least
examine the ConditionalFormatting for the affected controls.

Select any of the TextBox controls(or all of them) in form Design view
From the Format Menu select Conditional Formatting

Notice the Condition 1 is setup as:
Expression Is [txtcusActive]
The Font is Bolded with a Red Forecolor.

So when CF evaluates each row, if the txtCusActive CheckBox control is
equal to TRUE then it will apply the Conditional Formatting to the
TextBox control.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
<ce*******@yahoo.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Re: A2KConditionalFormattingVer27.mdb

I downloaded his sample database, and the field 'format' property was
the first thing I checked. That's why I assumed it must be code. But I
cant find anything. It will be nice if it's something simple that I'm
overlooking, but I suspect not. Only Stephan knows.
I appreciate what he's done, I think it's fabulous, but I can't use it
if I dont know the specs. or how to manipulate it.

I also experimented with the check box and the associated text boxes.
There seems to be some kind of awareness between them.

The check box can be any new check box from the 'toolbox' tool bar,
but....it's name MUST be "txtcusActive".

The text box has to be a COPY of the one used in the sample database.
It's name can be anything...
I also noticed if you use the format painter on a new text box, it
inherits the properties of the sample db text box.

The text box seems to be aware of the 'txtcusActive' check box state
and responds by changing color.

If I haven't overlooked anything, this tells me that the TEXT BOX is
sub-classed or whatever the process it called when you take a standard
windows control and add more funtionality to it.

I'd love to use it, but if I cant manipulate the color or how it
responds, I just simple cant. It's an excellent trick, though.
Still waiting for an answer...


Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.