Conditional Formatting on Active

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

Guest

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.
 
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.
 
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
 
Back
Top