Background Colors

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

Guest

Weel well,

Can the background color be the same of the same data? As..
Field1
999 background blue
999 background blue
555 background white
555 background white
555 background white
 
Not 100% sure what you're asking, but here's a guess:
If you want to store the background color in a field in your record, and
have a textbox on your form set to that background color for that record,
the answer is a qualified yes.
On a SingleView form, this is not difficult to accomplish with a little
code in the Form_Current event procedure:
MyTextBox.BackColor=Field1

My best guess, however, is that you want to do this in a continuous form.
You could do that by setting specific conditions, e.g. If Field1=999,
backgroundcolor is blue.
However, you are limited to 3 specific conditions and one default (if no
special conditions apply); I don't know if this is adequate for you.

HTH
 
NOt Bad

But it's not to the problem of how to set the background color into the
txtbox, the real problem is that the recordset .

In the record of each when to go back to the previous record to compare with
the current record suppose we use the code :

prerecord = currentrec
rsst.movenext
if prerecord <> currentrec then
controlname.background = constantcolor1
else
controlname.background = constantcolor2
end if

In the loop of do until rsst.eof, so the problem is ACCESS won't allow me
have the prerecord to store its value, required me to have only one current
record..

so if the problem being solved the background won't do the matter to me.
ah! ah! ah!
Thanks
 
Let me try again on understanding this:
When something happens (you haven't said what triggers this code), you
want to change the background color of a textbox in some but not all of the
rows. The rows you want to have the "selected" color are those where that
field matches the value in the selected row. All other rows should be a
different color. So we're really only talking two colors here.
Did I get closer this time?
 
Sorry to make you wait.
Use the Modify method of a FormatCondition object to change your conditional
formatting when you want to change which items are shown with a different
background.
 
Back
Top