dbTalk Databases Forums  

ForeColor <> Expected?

comp.databases.ms-access comp.databases.ms-access


Discuss ForeColor <> Expected? in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
(PeteCresswell)
 
Posts: n/a

Default ForeColor <> Expected? - 01-07-2011 , 09:40 AM






Got a screen where, AFIK, a control's .ForeColor is black.

But it is rendering as grey.

I've removed all the custom formatting, but grey persists.

Clearly I'm doing something wrong.... but what?

..Enabled = True and I've fooled around with .BackColor and
..BackStyle to no avail.

TB sure, there is quite a bit of coding going on behind the
rendering of this screen..... and I'll put my money on the
problem being there... but I'm running out of places to look.

Can anybody think of anything that might cause rendering in grey
even though .ForeColor = 0?

viz: http://tinyurl.com/252ecee
--
PeteCresswell

Reply With Quote
  #2  
Old   
(PeteCresswell)
 
Posts: n/a

Default Re: ForeColor <> Expected? - 01-07-2011 , 10:03 AM






Per (PeteCresswell):
Quote:
Can anybody think of anything that might cause rendering in grey
even though .ForeColor = 0?

viz: http://tinyurl.com/252ecee
Got it.

Programmatically setting .FormatConditions and then deleting same
somehow leaves things as if .FormatConditions were still in
place.... and I had made an unfortunate choice of shades of blue
against the grey background....

Times like this, I *really* wish I could delete NG posts.... -)
--
PeteCresswell

Reply With Quote
  #3  
Old   
Tony Toews
 
Posts: n/a

Default Re: ForeColor <> Expected? - 01-07-2011 , 02:49 PM



On Fri, 07 Jan 2011 11:03:51 -0500, "(PeteCresswell)" <x@y.Invalid>
wrote:

Quote:
Can anybody think of anything that might cause rendering in grey
even though .ForeColor = 0?

viz: http://tinyurl.com/252ecee

Got it.

Programmatically setting .FormatConditions and then deleting same
somehow leaves things as if .FormatConditions were still in
place.... and I had made an unfortunate choice of shades of blue
against the grey background....

Times like this, I *really* wish I could delete NG posts.... -)
Hehehe.

Actually no. I'm glad you psoted. This is useful because the
solution was not obvious.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
  #4  
Old   
David-W-Fenton
 
Posts: n/a

Default Re: ForeColor <> Expected? - 01-07-2011 , 08:34 PM



Tony Toews <ttoews (AT) telusplanet (DOT) net> wrote in
news:m0vei6h5euimebppi5pn6m19uhmqku1oem (AT) 4ax (DOT) com:

Quote:
On Fri, 07 Jan 2011 11:03:51 -0500, "(PeteCresswell)"
x@y.Invalid> wrote:

Can anybody think of anything that might cause rendering in grey
even though .ForeColor = 0?

viz: http://tinyurl.com/252ecee

Got it.

Programmatically setting .FormatConditions and then deleting same
somehow leaves things as if .FormatConditions were still in
place.... and I had made an unfortunate choice of shades of blue
against the grey background....

Times like this, I *really* wish I could delete NG posts.... -)

Hehehe.

Actually no. I'm glad you psoted. This is useful because the
solution was not obvious.
Yes, and if I ever encounter the same thing, I'll be able to
experience the excruciate process of wracking my brain trying to
remember what caused the problem, and doing dozens of Google Groups
searches trying to find it, to no avail.

--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/

Reply With Quote
  #5  
Old   
Tony Toews
 
Posts: n/a

Default Re: ForeColor <> Expected? - 01-07-2011 , 10:23 PM



On 8 Jan 2011 02:34:15 GMT, "David-W-Fenton" <dfassoc (AT) dfenton (DOT) com>
wrote:

Quote:
Times like this, I *really* wish I could delete NG posts.... -)

Hehehe.

Actually no. I'm glad you psoted. This is useful because the
solution was not obvious.

Yes, and if I ever encounter the same thing, I'll be able to
experience the excruciate process of wracking my brain trying to
remember what caused the problem, and doing dozens of Google Groups
searches trying to find it, to no avail.
Hehehehehe Ayup.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
  #6  
Old   
Marshall Barton
 
Posts: n/a

Default Re: ForeColor <> Expected? - 01-07-2011 , 11:09 PM



(PeteCresswell) wrote:

Quote:
Per (PeteCresswell):
Can anybody think of anything that might cause rendering in grey
even though .ForeColor = 0?

viz: http://tinyurl.com/252ecee

Got it.

Programmatically setting .FormatConditions and then deleting same
somehow leaves things as if .FormatConditions were still in
place.... and I had made an unfortunate choice of shades of blue
against the grey background....

Times like this, I *really* wish I could delete NG posts.... -)
Glad you did post it.

I do have one little tidbit of information about using code
to set/change/delete a FormatCondition. Doing that kind of
thing in code does not mark the form as dirty, so closing
the form does not automatically save the change. I found
that if the CF code is followed by a line that makes any
innocuous change (e.g. Me.text1.Left = Me.text1.Left) then
Access will recognize that the form has been changed and
save it.

--
Marsh

Reply With Quote
  #7  
Old   
Tony Toews
 
Posts: n/a

Default Re: ForeColor <> Expected? - 01-08-2011 , 02:46 PM



On Fri, 07 Jan 2011 23:09:53 -0600, Marshall Barton
<marshbarton (AT) wowway (DOT) com> wrote:

Quote:
Can anybody think of anything that might cause rendering in grey
even though .ForeColor = 0?

viz: http://tinyurl.com/252ecee

Got it.

Programmatically setting .FormatConditions and then deleting same
somehow leaves things as if .FormatConditions were still in
place.... and I had made an unfortunate choice of shades of blue
against the grey background....

Times like this, I *really* wish I could delete NG posts.... -)

Glad you did post it.

I do have one little tidbit of information about using code
to set/change/delete a FormatCondition. Doing that kind of
thing in code does not mark the form as dirty, so closing
the form does not automatically save the change. I found
that if the CF code is followed by a line that makes any
innocuous change (e.g. Me.text1.Left = Me.text1.Left) then
Access will recognize that the form has been changed and
save it.
Ahhh, now that's interesting and could make a lot of sense.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
  #8  
Old   
David-W-Fenton
 
Posts: n/a

Default Re: ForeColor <> Expected? - 01-09-2011 , 04:46 PM



Marshall Barton <marshbarton (AT) wowway (DOT) com> wrote in
news:mqrfi6d0tahs6m1tmplr4f4pcqs980g4b0 (AT) 4ax (DOT) com:

Quote:
(PeteCresswell) wrote:

Per (PeteCresswell):
Can anybody think of anything that might cause rendering in grey
even though .ForeColor = 0?

viz: http://tinyurl.com/252ecee

Got it.

Programmatically setting .FormatConditions and then deleting same
somehow leaves things as if .FormatConditions were still in
place.... and I had made an unfortunate choice of shades of blue
against the grey background....

Times like this, I *really* wish I could delete NG posts.... -)

Glad you did post it.

I do have one little tidbit of information about using code
to set/change/delete a FormatCondition. Doing that kind of
thing in code does not mark the form as dirty, so closing
the form does not automatically save the change. I found
that if the CF code is followed by a line that makes any
innocuous change (e.g. Me.text1.Left = Me.text1.Left) then
Access will recognize that the form has been changed and
save it.
I'm really confused. Aren't we talking about a design change versus
a data change? There is no way to detect, so far as I know, if a
design change is unsaved (Me.Dirty is only about data). Setting a
property at runtime should not, in my opinion, cause a form's design
to be marked for the need to be changed. If it did, it would mean
users got prompts all the time, and that would be terrible.

--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/

Reply With Quote
  #9  
Old   
Marshall Barton
 
Posts: n/a

Default Re: ForeColor <> Expected? - 01-09-2011 , 06:11 PM



David-W-Fenton wrote:

Quote:
Marshall Barton <marshbarton (AT) wowway (DOT) com> wrote in
news:mqrfi6d0tahs6m1tmplr4f4pcqs980g4b0 (AT) 4ax (DOT) com:

(PeteCresswell) wrote:

Per (PeteCresswell):
Can anybody think of anything that might cause rendering in grey
even though .ForeColor = 0?

viz: http://tinyurl.com/252ecee

Got it.

Programmatically setting .FormatConditions and then deleting same
somehow leaves things as if .FormatConditions were still in
place.... and I had made an unfortunate choice of shades of blue
against the grey background....

Times like this, I *really* wish I could delete NG posts.... -)

Glad you did post it.

I do have one little tidbit of information about using code
to set/change/delete a FormatCondition. Doing that kind of
thing in code does not mark the form as dirty, so closing
the form does not automatically save the change. I found
that if the CF code is followed by a line that makes any
innocuous change (e.g. Me.text1.Left = Me.text1.Left) then
Access will recognize that the form has been changed and
save it.

I'm really confused. Aren't we talking about a design change versus
a data change? There is no way to detect, so far as I know, if a
design change is unsaved (Me.Dirty is only about data). Setting a
property at runtime should not, in my opinion, cause a form's design
to be marked for the need to be changed. If it did, it would mean
users got prompts all the time, and that would be terrible.

Sorry, David, my post really was confusing. I was trying to
describe a situation where the form was opened in design
view by:
DoCmd.OpenForm "theForm", acDesign
then changing *only* CF properties does not mark Access'
internal "dirty" flag (not the form property) that indicates
the form's design has been changed. When the form is then
closed by using:
DoCmd.Close "theform", acSaveYes
Access does NOT save the form's design because it doesn't
realize that the form's design was changed.

The addition of the innocuous change to the form's design
was a workaround because it does set Access' internal
"dirty" flag and all the changes are then saved.

--
Marsh

Reply With Quote
  #10  
Old   
Tony Toews
 
Posts: n/a

Default Re: ForeColor <> Expected? - 01-10-2011 , 12:18 AM



On Sun, 09 Jan 2011 18:11:02 -0600, Marshall Barton
<marshbarton (AT) wowway (DOT) com> wrote:

Quote:
I do have one little tidbit of information about using code
to set/change/delete a FormatCondition. Doing that kind of
thing in code does not mark the form as dirty, so closing
the form does not automatically save the change. I found
that if the CF code is followed by a line that makes any
innocuous change (e.g. Me.text1.Left = Me.text1.Left) then
Access will recognize that the form has been changed and
save it.

I'm really confused. Aren't we talking about a design change versus
a data change? There is no way to detect, so far as I know, if a
design change is unsaved (Me.Dirty is only about data). Setting a
property at runtime should not, in my opinion, cause a form's design
to be marked for the need to be changed. If it did, it would mean
users got prompts all the time, and that would be terrible.


Sorry, David, my post really was confusing. I was trying to
describe a situation where the form was opened in design
view by:
DoCmd.OpenForm "theForm", acDesign
then changing *only* CF properties does not mark Access'
internal "dirty" flag (not the form property) that indicates
the form's design has been changed. When the form is then
closed by using:
DoCmd.Close "theform", acSaveYes
Access does NOT save the form's design because it doesn't
realize that the form's design was changed.

The addition of the innocuous change to the form's design
was a workaround because it does set Access' internal
"dirty" flag and all the changes are then saved.
I'm thinking this should be tested in A2010 and reported to MS if it's
still present. IMNSHO this is a bug and not a feature.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.