473,782 Members | 2,393 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form Datasheet Formatting

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
4 3299
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
Re: A2KConditionalF ormattingVer27. 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 "txtcusActi ve".

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
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 'FormatConditio ns' collection and in
the collection
you can store a 'FormatConditio n' object.
Each object stores the 'conditions' in which the control may change its
format. Simple.
Even simpler....Clic k the control (text or combo)...then click the menu
'Format | Conditional Formatting...'
There it is, plain and simple to use.

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

Nov 13 '05 #4
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 ConditionalForm atting 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*******@yaho o.com> wrote in message
news:11******** **************@ c13g2000cwb.goo glegroups.com.. .
Re: A2KConditionalF ormattingVer27. 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 "txtcusActi ve".

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
15852
by: Prakash Wadhwani | last post by:
Is there any EASY way to highlight a full row in a continuous form so that as i navigate up & down the table/continuous form using the arrow keys, the entire line (all fields) get highlighted ? This will give the effect of a bar moving up & down. BTW, all fields are locked so this form is View-Only & not editable. Thx & Best Rgds, Prakash.
2
2606
by: Terry | last post by:
I have cerated a Form, ExamsFrm, which is used to input details of exams taken at several Centres. It dosplays details from StudentTbl and has a SubForm which displays details from ExamsTble. I have incorporated some VB6 code as well as some Conditional Formatting. The code automatically updates CheckBoxes in the SubForm, depending on exam results, and the Conditional Formatting changes background colours, depending on CheckBox datum. ...
2
1910
by: PC Datasheet | last post by:
Does anyone have a technique for grouping in a form like grouping in a report and still be able to enter data in the form? Thanks for all responses, Steve PC Datasheet
2
1518
by: Sean | last post by:
Dear All, I have a table with many fields the relevant ones being ,,,. The table contains (at present) 16 records. I would like to create a form which displays these fields (preferbally in Datasheet view) where the field will show a box dependant on it's respective color. I have tried the following so far :-
3
6781
by: David | last post by:
Hi, I need a button shown for each record (cont. form) with specific captions on each. I have a notes form for each record. When a user presses the button they can read the notes. I want to display a caption on the button to state either "Order Notes" or "READ NOTES". I placed a label over the button, and depending if the notes field is
1
2832
by: sasan3 | last post by:
when I set visible=false, then entry is not visible in form view, but still shows up in datasheet view. How do I make a field not to show based on some condition in datasheet view? Tx.
5
4759
by: Newbie | last post by:
I would like to display certain columns from a table on a form. One of my columns that I want to show is a Yes/No field so that my users can pick their players for a fantasy football week. If they could use the table directly, the datasheet view allows them a check box to set yes and no for the player in that row. However, I don't want them to access the table directly. I can't find a contol that will let me use the datasheet view...
2
1918
by: keri | last post by:
I would like to set up conditional formatting on a form. One of the fields on the form is a date (). If the calldate field is over 365 days ago I would like all the other fields on the form line to turn green but I am not sure if this is possible. Thanks
2
1614
by: mattloflin | last post by:
First off I have searched on this forum and others for about 1.5 hours and can't find relevant information. I have a form that is in viewsheet or datasheet mode so when you click it it looks like a spreadsheet. this is the code that i want to expand but I have to get it working first. With Me.Description If .Value = "Print Not Available" Then .ForeColor = vbRed End If
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9946
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3643
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.