PC Review


Reply
Thread Tools Rate Thread

Conditional Formatting - Worked - Bad - Doesn't Work

 
 
Victor
Guest
Posts: n/a
 
      6th May 2010
I set a text box for conditional formatting based on a check box (no check
- normal, checked- bold, red bg, yellow font). I did this to 6 text boxes
(based on 6 check boxes).
This is the code I used:
[Check183].Value=-1

The first time I did one box, it worked, when I coded the other 5, I got
some out of memory error and could not open up the form again. Luckily, I
had a backup (that i created right before playing with this). When I did
one, it didn't work, nor all 6, but it didn't give me the memory error.

Any ideas?

Vic
 
Reply With Quote
 
 
 
 
Victor
Guest
Posts: n/a
 
      7th May 2010
Thank you so much. I don't know why it worked the first time (this morning)
with [Check183].Value=-1

Quick question, why does it do the formating if = -1, not 1 (yes or
checked)?
May help me in the future

Thanks again


Marshall Barton <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> Victor wrote:
>
>>I set a text box for conditional formatting based on a check box (no
>>check - normal, checked- bold, red bg, yellow font). I did this to 6
>>text boxes (based on 6 check boxes).
>>This is the code I used:
>>[Check183].Value=-1
>>
>>The first time I did one box, it worked, when I coded the other 5, I
>>got some out of memory error and could not open up the form again.
>>Luckily, I had a backup (that i created right before playing with
>>this). When I did one, it didn't work, nor all 6, but it didn't give
>>me the memory error.

>
> I would expect [Check183] = -1 to work IF you are using the
> Expression Is option.
>
> If it doesn't, I suspect your form is corrupted. Try
> creating a new blank database, set all it's options as
> needed (especially that Name Auto Correct is OFF), and then
> import everything from the problem database.
>


 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      7th May 2010
On 07 May 2010 02:10:45 GMT, Victor <(E-Mail Removed)> wrote:

>Quick question, why does it do the formating if = -1, not 1 (yes or
>checked)?


In an Access JET/ACE backend, a Yes/No field is in fact stored as -1 for Yes,
0 for No.

If the backend is SQL/Server it's possible (but not obligatory) that the field
is a BIT field, with 1 being Yes and 0 being No.
--

John W. Vinson [MVP]
 
Reply With Quote
 
Victor
Guest
Posts: n/a
 
      7th May 2010
Very weird. I coded it as was advised [Check183]=-1 for EXPRESSION IS.
It worked. When I reopened the db up later to do some more work, it doesn't
work now, but the coding for the CF is still there.
????? Can't figure this one.

John W. Vinson <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in
news:(E-Mail Removed):

> On 07 May 2010 02:10:45 GMT, Victor <(E-Mail Removed)> wrote:
>
>>Quick question, why does it do the formating if = -1, not 1 (yes or
>>checked)?

>
> In an Access JET/ACE backend, a Yes/No field is in fact stored as -1
> for Yes, 0 for No.
>
> If the backend is SQL/Server it's possible (but not obligatory) that
> the field is a BIT field, with 1 being Yes and 0 being No.


 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      7th May 2010
On 07 May 2010 13:18:40 GMT, Victor <(E-Mail Removed)> wrote:

>Very weird. I coded it as was advised [Check183]=-1 for EXPRESSION IS.
>It worked. When I reopened the db up later to do some more work, it doesn't
>work now, but the coding for the CF is still there.


"Doesn't work" is a bit hard to answer...
--

John W. Vinson [MVP]
 
Reply With Quote
 
Victor
Guest
Posts: n/a
 
      7th May 2010
John W. Vinson <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in
news:(E-Mail Removed):

> On 07 May 2010 13:18:40 GMT, Victor <(E-Mail Removed)> wrote:
>
>>Very weird. I coded it as was advised [Check183]=-1 for EXPRESSION
>>IS. It worked. When I reopened the db up later to do some more work,
>>it doesn't work now, but the coding for the CF is still there.

>
> "Doesn't work" is a bit hard to answer...


Doesn't work as in if I check the box (Check183), it doesn't change the
formating of the text box that I put the conditional code in (Bold, Red BG,
Yellow Font). It worked when I first did it then saved it, closed Access,
opened it later, didn't work. Checked to see if the coding was still there,
it was.

 
Reply With Quote
 
Victor
Guest
Posts: n/a
 
      14th May 2010
It seems cleaning up a few left over prt_click()s solved all my problems.
Thanks for the direction to look into.

Vito/Victor>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting macro: simple, but doesn't work JP Microsoft Excel Programming 6 18th Feb 2010 10:42 AM
Conditional formatting - why doesn't this work? DDawson Microsoft Excel Programming 3 7th Oct 2008 11:42 AM
locate duplicates by sing conditional formatting--doesn't work for =?Utf-8?B?a2V3YXdvbWFu?= Microsoft Excel Misc 2 1st Sep 2005 01:39 PM
worked yesterday- doesn't work today =?Utf-8?B?UWFzcGVj?= Microsoft Excel Programming 8 25th Feb 2005 04:39 AM
it worked now it doesn't work Damia Monpoor Windows XP General 2 31st May 2004 10:58 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:55 PM.