PC Review


Reply
Thread Tools Rate Thread

Changing Backround Color.

 
 
Antonio
Guest
Posts: n/a
 
      19th Sep 2003
I have a form that contains several data fields. For the
field properties the Backround Style + Transparent and the
Backround Color = White. Is there a way to set the fields
so that each time data is entered into the field the
backround color changes from white to a different color?

TIA
Antonio
 
Reply With Quote
 
 
 
 
cafe
Guest
Posts: n/a
 
      20th Sep 2003
Do you mean, when the user types some characters into a previously-blank
field, its color should instantly change to something else?

TC


"Antonio" <(E-Mail Removed)> wrote in message
news:7b5b01c37e54$cc29f400$(E-Mail Removed)...
> I have a form that contains several data fields. For the
> field properties the Backround Style + Transparent and the
> Backround Color = White. Is there a way to set the fields
> so that each time data is entered into the field the
> backround color changes from white to a different color?
>
> TIA
> Antonio



 
Reply With Quote
 
Ken Snell
Guest
Posts: n/a
 
      20th Sep 2003
Note that the color of the background is ignored by ACCESS when the
control's back style is set to Transparent.

You could use an event that the control has to change either of these
properties. For example, if you want to change the style and color when
focus is received by the control and when focus is lost:

Private Sub ControlName_GotFocus()
' change back style to Solid
Me.ControlName.BackStyle = 1
' change back color to white
Me.ControlName.BackColor = 16777215
End Sub

Private Sub ControlName_LostFocus()
' change back style to Transparent
Me.ControlName.BackStyle = 0
' change back color to white
Me.ControlName.BackColor = 16777215
End Sub

--
Ken Snell
<MS ACCESS MVP>

"Antonio" <(E-Mail Removed)> wrote in message
news:7b5b01c37e54$cc29f400$(E-Mail Removed)...
> I have a form that contains several data fields. For the
> field properties the Backround Style + Transparent and the
> Backround Color = White. Is there a way to set the fields
> so that each time data is entered into the field the
> backround color changes from white to a different color?
>
> TIA
> Antonio



 
Reply With Quote
 
Antonio
Guest
Posts: n/a
 
      21st Sep 2003
Yes, exactly.
>-----Original Message-----
>Do you mean, when the user types some characters into a

previously-blank
>field, its color should instantly change to something

else?
>
>TC
>
>
>"Antonio" <(E-Mail Removed)> wrote in message
>news:7b5b01c37e54$cc29f400$(E-Mail Removed)...
>> I have a form that contains several data fields. For the
>> field properties the Backround Style + Transparent and

the
>> Backround Color = White. Is there a way to set the

fields
>> so that each time data is entered into the field the
>> backround color changes from white to a different color?
>>
>> TIA
>> Antonio

>
>
>.
>

 
Reply With Quote
 
TC
Guest
Posts: n/a
 
      22nd Sep 2003
Ok.

- The Change event of a control, will fire whenever you type a character
into it. So that is the event you need.

- The background color of a control, is changed by setting its BackColor
property to a number. For example, 0=black. 255=red. Or better, use the
RGB() function. For example, RGB(11,22,33) returns a number for the color
defined by Red (11 of 255 maximum), Green (22 of 255 maximum) and Blue (33
of 255 maximum).

So you just need to code a Change event for the control(s) in question, to
change their BackColor properties to a color number as defined above.

I will not try to give you the code, because I don't have Access here to
check. But it should be very simple.

HTH,
TC


"Antonio" <(E-Mail Removed)> wrote in message
news:085101c38030$bc011940$(E-Mail Removed)...
> Yes, exactly.
> >-----Original Message-----
> >Do you mean, when the user types some characters into a

> previously-blank
> >field, its color should instantly change to something

> else?
> >
> >TC
> >
> >
> >"Antonio" <(E-Mail Removed)> wrote in message
> >news:7b5b01c37e54$cc29f400$(E-Mail Removed)...
> >> I have a form that contains several data fields. For the
> >> field properties the Backround Style + Transparent and

> the
> >> Backround Color = White. Is there a way to set the

> fields
> >> so that each time data is entered into the field the
> >> backround color changes from white to a different color?
> >>
> >> TIA
> >> Antonio

> >
> >
> >.
> >



 
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
Can't get backround color on my browser fatboymalloy Windows XP General 8 23rd Apr 2006 11:26 PM
backround color in windows rose Windows XP Customization 2 29th Sep 2004 01:57 AM
no backround color wem Windows XP Internet Explorer 0 3rd Apr 2004 11:56 PM
Backround color Rado Microsoft VB .NET 4 8th Mar 2004 07:12 PM
Active record backround color Carl Microsoft Access Form Coding 1 26th Nov 2003 02:36 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:09 PM.