Q: Why won't this work 
Author Message
 Q: Why won't this work

I'm trying to change the background color of certain
textboxes (either in datasheet or continuous form modes)
based on the index value of the recordset...

My question is, why won't the following example work

on the forms module I've placed the following code

Private Sub Form_Current()
         Const WHITE = 16777215
         Const YELLOW = 65535
         If (Me!RecordsetClone.Index Mod 2) = 0 Then
            Me![ProductID].BackColor = YELLOW
            Me![Quantity].BackColor = YELLOW
            Me![Discount].BackColor = YELLOW
            Me![UnitPrice].BackColor = YELLOW
            Me![ExtendedPrice].BackColor = YELLOW
            Else
            Me![ProductID].BackColor = WHITE
            Me![Quantity].BackColor = WHITE
            Me![Discount].BackColor = WHITE
            Me![UnitPrice].BackColor = WHITE
            Me![ExtendedPrice].BackColor = WHITE
            End If
End Sub

Private Sub Form_AfterUpdate()
    Form_Current
End Sub

etc...

Is there something staring at me that I'm missing
or is the code wronly put together...?



Mon, 18 Sep 2000 03:00:00 GMT  
 Q: Why won't this work

John, check the back style to see if it is transparent or normal

Nirmala Sekhar

--------------------------------------------------------------------------------------------
{*filter*} Software Consultant / Developer
--------------------------------------------------------------------------------------------



Quote:
>I'm trying to change the background color of certain
>textboxes (either in datasheet or continuous form modes)
>based on the index value of the recordset...

>My question is, why won't the following example work

Nirmala Sekhar

--------------------------------------------------------------------------------------------
{*filter*} Software Consultant / Developer
--------------------------------------------------------------------------------------------


Mon, 18 Sep 2000 03:00:00 GMT  
 Q: Why won't this work

Hi,

Can't change the color of controls on a continuous form without affecting
all records.  You can instead try using Format statement in source of an
unbound  text box to display colored text .

HTH

--
Dev Ashish (Just my $.001)
---------------
The Access Web ( http://home.att.net/~dashish )
---------------


:I'm trying to change the background color of certain
:textboxes (either in datasheet or continuous form modes)
:based on the index value of the recordset...
:
:My question is, why won't the following example work
<,snip>



Mon, 18 Sep 2000 03:00:00 GMT  
 Q: Why won't this work

It won't work because you can't change the colour of a datasheet and you
can program the background colour of a textbox in the detail section of
your continuus form, but it will change for every row.


: I'm trying to change the background color of certain
: textboxes (either in datasheet or continuous form modes)
: based on the index value of the recordset...

: My question is, why won't the following example work

: on the forms module I've placed the following code

: Private Sub Form_Current()
:          Const WHITE = 16777215
:          Const YELLOW = 65535
:          If (Me!RecordsetClone.Index Mod 2) = 0 Then
:             Me![ProductID].BackColor = YELLOW
:             Me![Quantity].BackColor = YELLOW
:             Me![Discount].BackColor = YELLOW
:             Me![UnitPrice].BackColor = YELLOW
:             Me![ExtendedPrice].BackColor = YELLOW
:             Else
:             Me![ProductID].BackColor = WHITE
:             Me![Quantity].BackColor = WHITE
:             Me![Discount].BackColor = WHITE
:             Me![UnitPrice].BackColor = WHITE
:             Me![ExtendedPrice].BackColor = WHITE
:             End If
: End Sub

: Private Sub Form_AfterUpdate()
:     Form_Current
: End Sub

: etc...

: Is there something staring at me that I'm missing
: or is the code wronly put together...?

--
--- CANADA: Our wind blows trees really well! --



Thu, 21 Sep 2000 04:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Two Q's [Closing a file][why won't work]

2. Why won't this work?

3. Why won't this work?

4. Why won't INSTR() work!!???

5. Why won't AllowZeroLength work?

6. Why won't this work?

7. Why won't this work

8. Why won't this work?

9. Why won't this work right

10. Why won't this work?

11. Why the frick won't this work?

12. why won't call Absoulute work??

 

 
Powered by phpBB® Forum Software