Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2005

Tip: Looking for answers? Try searching our database.

Steve Lebans A2KConditionalFormattingVer27

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rick Allison - 11 May 2005 14:44 GMT
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
Marshall Barton - 11 May 2005 16:15 GMT
>It's not working for me when I use a very simple query?
>
[quoted text clipped - 22 lines]
>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.

Signature

Marsh
MVP [MS Access]

rick a - 11 May 2005 17:42 GMT
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 A

> >It's not working for me when I use a very simple query?
> >
[quoted text clipped - 39 lines]
> Marsh
> MVP [MS Access]
Marshall Barton - 11 May 2005 19:21 GMT
>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
[quoted text clipped - 7 lines]
>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.

Signature

Marsh
MVP [MS Access]

rick a - 16 May 2005 13:30 GMT
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,

--
Rick Allison

> >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
[quoted text clipped - 17 lines]
> Marsh
> MVP [MS Access]
Marshall Barton - 16 May 2005 22:31 GMT
>There must be some secret to Stephen's form and conditional formatting that
>I just do not understand.
[quoted text clipped - 9 lines]
>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.

Signature

Marsh
MVP [MS Access]

rick a - 16 May 2005 17:46 GMT
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 Allison
> >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
[quoted text clipped - 17 lines]
> Marsh
> MVP [MS Access]
Marshall Barton - 16 May 2005 22:38 GMT
>What's the difference between "Bring to Front" and "Send to Back"?  Can
>these be controlled programmatically?
[quoted text clipped - 5 lines]
>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.

Signature

Marsh
MVP [MS Access]

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.