Steve Lebans A2KConditionalFormattingVer27

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

It's not working for me when I use a very simple query?

I've downloaded and taken a look at Steve's A2KConditionalFormattingVer27
database. It works great and I really want to use it. Based on my testing
it works great against a data table but not a query. I wonder why?

In his example he is going against a table called customerNoName. I created
a query called qrycustomerNoName, changed the sample form and everything
worked.

I then tried my query. Here's my query...
SELECT tblEventDate.EventDateID, tblEventDate.EventDate,
tblEventDate.EventDateName, tblEventDate.EventDateInitials,
tblEventDate.EventDateDescription, tblEventDate.HighInTrial,
tblEventDate.HighCombined, qrySelectLockedInEvent.EventID
FROM qrySelectLockedInEvent INNER JOIN tblEventDate ON
qrySelectLockedInEvent.EventID = tblEventDate.EventID
WHERE (((tblEventDate.EventDate) Is Not Null))
ORDER BY tblEventDate.EventDate;

The form stopped showing the background colors. The only thing I changed
was the recordsource to this query.

I'm stumped and wondered if Steve or anyone else can give me some ideas on
what to try to make this work. I really like the idea and it will add a lot
of value to my application.

Thanks,

Rick
 
Rick Allison said:
It's not working for me when I use a very simple query?

I've downloaded and taken a look at Steve's A2KConditionalFormattingVer27
database. It works great and I really want to use it. Based on my testing
it works great against a data table but not a query. I wonder why?

In his example he is going against a table called customerNoName. I created
a query called qrycustomerNoName, changed the sample form and everything
worked.

I then tried my query. Here's my query...
SELECT tblEventDate.EventDateID, tblEventDate.EventDate,
tblEventDate.EventDateName, tblEventDate.EventDateInitials,
tblEventDate.EventDateDescription, tblEventDate.HighInTrial,
tblEventDate.HighCombined, qrySelectLockedInEvent.EventID
FROM qrySelectLockedInEvent INNER JOIN tblEventDate ON
qrySelectLockedInEvent.EventID = tblEventDate.EventID
WHERE (((tblEventDate.EventDate) Is Not Null))
ORDER BY tblEventDate.EventDate;

The form stopped showing the background colors. The only thing I changed
was the recordsource to this query.

I'm stumped and wondered if Steve or anyone else can give me some ideas on
what to try to make this work. I really like the idea and it will add a lot
of value to my application.


Mr. Lebans name is Stephen, not Steve.

In general Conditional Formatting does not care about the
form's record source, unless the CF expression refers
directly to a field in the table. If that's the case, then
double check your CF expression and make sure all of its
terms refer to an existing bound control. Whatever problem
your having is probably simple and just getting the names
straightened out is all you need.

If you can't find anything amiss, post back with more
details about your settings in the CF window.
 
Marsh,

Stephen it is. I do not mean any disrespect.

I took Stephen's CustomerInContinuousView form and added three new text
boxes. I left the record source the same and tested the form. It worked as
designed with the three new text boxes showing #Name?. I then changed the
record source from customerNoName to qrySelectEventDate and tried again.
The color does not display, the original text boxes show #Name? and the
three new text boxes show data from my database. Perfect except the
conditional formatting does not change the background color.

That's why I asked this group. What can I provide that will help debug. I
think I've got it down to a very simple test. The question is...what have I
missed?

I agree, I cannot imagine that the record source is of any concern but
that's the only change I make to the form.


Thanks so much.
 
rick said:
I took Stephen's CustomerInContinuousView form and added three new text
boxes. I left the record source the same and tested the form. It worked as
designed with the three new text boxes showing #Name?. I then changed the
record source from customerNoName to qrySelectEventDate and tried again.
The color does not display, the original text boxes show #Name? and the
three new text boxes show data from my database. Perfect except the
conditional formatting does not change the background color.

That's why I asked this group. What can I provide that will help debug. I
think I've got it down to a very simple test. The question is...what have I
missed?


Take a look at the Conditional Formatting properties window
(Format menu) for the text boxes. It probaly has an
expression that refers to the text boxes that are now
displaying #Name, so the CF condition can not be evaluated
properly.
 
Marsh,

There must be some secret to Stephen's form and conditional formatting that
I just do not understand.

When I copy Stephen's form and change the control names to fields in my
recordsource everything seems to work. Oh, I did modify code in his
conditional formatting class to recognize the new form name.

However, when I create a brand new form, put all the exact same fields and
recordsource on it, and try to make it work it does not.

Do you know what the secret is? I cannot find it. I've made my new form
work but I'd like to extend this to other already created forms but I just
don't know what to add or configure to make it work.

Thanks,
 
Marsh,

What's the difference between "Bring to Front" and "Send to Back"? Can
these be controlled programmatically?

I ask because when I take the textbox that is reference in Stephen's code,
txtBackGround, and bring it to the front the form acts funny. When I send
txtBackGround to back the form works as expected.

I've done some research on "bring to front" and "send to back" but have not
found much at this time.

Thanks again,
 
rick said:
There must be some secret to Stephen's form and conditional formatting that
I just do not understand.

When I copy Stephen's form and change the control names to fields in my
recordsource everything seems to work. Oh, I did modify code in his
conditional formatting class to recognize the new form name.

However, when I create a brand new form, put all the exact same fields and
recordsource on it, and try to make it work it does not.

Do you know what the secret is? I cannot find it. I've made my new form
work but I'd like to extend this to other already created forms but I just
don't know what to add or configure to make it work.


AFAIK, there is no "secret", it's just a matter of getting
all the details straightened out.

I do want to mention that you seem to be confusing the words
FIeld and Control, A field is a column in a table/query,
while a control is an object on a form/report that is used
to display values. The name of a control has nothing to do
with the name of a field, except in some cases where they
must be different.
 
rick said:
What's the difference between "Bring to Front" and "Send to Back"? Can
these be controlled programmatically?

I ask because when I take the textbox that is reference in Stephen's code,
txtBackGround, and bring it to the front the form acts funny. When I send
txtBackGround to back the form works as expected.

I've done some research on "bring to front" and "send to back" but have not
found much at this time.


Bring to Front and Send to Back are how you can manipulate
what's called the Z-order ov the controls. There is no way
to do that manipulation at runtime.

The control that's used to display different backcolors must
be in the back, behind the text box with the Transparent
BackStyle.

You might want to create a test form and play around with
this a little just to get a feel for how it all fits
together. Once you get a grip on these properties, you'll
find that there's nothing mysterious about it.
 
Back
Top