Conditional Formatting on Active

W

Walt

I would really like to be able to change the focus color of a textbox to a different color than white, but I don't believe that it is possible. So what I am trying to do now is change the font color that I have in the active textbox while I am there to some color and then when it has lost focus change it back to the previous color. I am using Access 97, so A2KConditionalFormatting will not work for me.
 
N

Nikos Yannacopoulos

Walt,

Not sure this will work in A97, I'm using A2K, but seems
to be plain VB rather than conditional formatting, so you
might want to give it a shot: In the Got focus / Lost
focus events of the contor:

Forms("FormName").ActiveControl.BackColor = 8454143

(this number actually makes it yellow, 16777215 amkes it
white).

HTH,
Nikos

-----Original Message-----
I would really like to be able to change the focus color
of a textbox to a different color than white, but I don't
believe that it is possible. So what I am trying to do
now is change the font color that I have in the active
textbox while I am there to some color and then when it
has lost focus change it back to the previous color. I am
using Access 97, so A2KConditionalFormatting will not work
for me.
 
E

Evi

In Access 97 this works on a combo box control called cboCustomer

Private Sub cboCustomer_GotFocus()
Me.cboCustomer.BackColor = 8454143
End Sub


Private Sub cboCustomer_LostFocus()
Me.cboCustomer.BackColor = 16777215
End Sub

But there is a big snag. It doesn't work in Datasheet view (which is
exactly when one would want it to work).

Evi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top