VBA Textbox back color from load? Current?

Neilster

Registered User.
Local time
Today, 04:26
Joined
Jan 19, 2014
Messages
218
Hi All

I have a combobox and textbox for username and password blah blah blah

when I start up Access the login form appears as usual and is .setFocus to the combobox, silly really but I want to lose the black back color and just have it transparent when the curser is flashing. I've tried all sorts of VBA but to no avail.:banghead:

Anyone got any ideas?? :D
 
You need to be sneaky and Set the back colour to the same as the font colour. When it's got focus it will be "highlighted" and revert to the opposite colour making it appear transparent...

I bet this gets lost in translation
 
Cheers Minty,

However in the textbox 'Enter Password' is set, by doing your solution it just makes everything gray and therefore can't see 'Enter Password' or am I missing something. (-:
 
are you using Cuing Banner?
 
I like to not have the black background if possible and be transparent.
 

Attachments

  • Untitled.png
    Untitled.png
    3.6 KB · Views: 71
from your combo, textbox or both?
 
i wasnt able to, but ive found out that you can set the .SelStart and .SelLength property of your combobox to 0, to make it synthetically without background.

Public Sub Form_Load()
Me.yourCombo.SetFocus
Call yourCombo_Change
End Sub

Private Sub yourCombo_Change()
With Me.yourCombo
.SelStart=0
.SelLength=0
End With
End Sub
 
Now the box is completely garyed out and grays out the text so you can't see anything?
 
what do you mean, did you change to combo and textbx colors from their default values? try to revert to original fore/background color of your control. then try my code.
 

Users who are viewing this thread

Back
Top Bottom