UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Appearance Of Textbox When Gets Focus    
 
   
SRaftery
post Mar 12 2012, 11:02 AM
Post #1

UtterAccess Addict
Posts: 112
From: Lancashire, UK



Hi all you guys.

I have a form displaying a lot of info in textbox controls.
Whenever I select a particular textbox, it gets the focus, and the displayed foreground colour changes.
But I find that when this happens, the text displayed becomes difficult to see!

Can I change this, so that when a textbox control gets the focus, the border changes, rather than the background?



Stephen
Go to the top of the page
 
+
accesshawaii
post Mar 12 2012, 11:12 AM
Post #2

UtterAccess VIP
Posts: 4,582
From: From Hawaii - Now in Wisconsin...Am I Nuts?



If you have it coded, you could just do something like this.

CODE
Private Sub YourTextBox_GotFocus()
Me.YourTextBox.BorderColor = vbRed
End Sub
Go to the top of the page
 
+
Doug Steele
post Mar 12 2012, 11:23 AM
Post #3

UtterAccess VIP
Posts: 17,609
From: Don Mills, ON (Canada)



I'm guessing that Stephen is referring to the fact that when you enter a text box, all of the text in that text box gets selected.

To get around that, you need to set the SelLength property to 0, so that nothing's selected.
Go to the top of the page
 
+
accesshawaii
post Mar 12 2012, 11:31 AM
Post #4

UtterAccess VIP
Posts: 4,582
From: From Hawaii - Now in Wisconsin...Am I Nuts?



Hi Stephen,

Is it a matter when you tab to another field that the background color is just changing to something that is hard to read with the text? If it's just that, you can just go into design view on the form and go to properties for the text box. Under the format tab, a few down, you will see options for "Back Style" and "Back Color". You can modify the "Back Color" to be something easier on the eyes or if you do not want it to change at all, you can set the "Back Style" to transparent.
Go to the top of the page
 
+
SRaftery
post Mar 12 2012, 11:46 AM
Post #5

UtterAccess Addict
Posts: 112
From: Lancashire, UK



<i> If it's just that, you can just go into design view on the form and go to properties for the text box. Under the format tab, a few down, you will see options for "Back Style" and "Back Color". You can modify the "Back Color" to be something easier on the eyes or if you do not want it to change at all, you can set the "Back Style" to transparent.</i>

I did try that: the Background style is set to Transparent, but I still get the problem. It seems to be something to do with when the control gets the focus, but I cannot track down how to modify this

I cannot find teh SelLength property - I am using Access 2003 (I know, I know, it is steam-driven)

I do not want to change teh colour property at runtime, because that affect the control box in every row of the recordset.


Any other ideas?



Stephen



Go to the top of the page
 
+
accesshawaii
post Mar 12 2012, 11:55 AM
Post #6

UtterAccess VIP
Posts: 4,582
From: From Hawaii - Now in Wisconsin...Am I Nuts?



If you have already checked the code for the text boxes and that's not it then check "Conditional Formatting". That's probably where the setting is.
Go to the top of the page
 
+
missinglinq
post Mar 12 2012, 12:03 PM
Post #7

UtterAccess Ruler
Posts: 2,655



Is this a database someone else designed? I ask because it sounds as if the designer is using Conditional Formatting, as Dan said, and I'm assuming that it wasn't you. To check, in Form Design View,
  • Right Click on Control
  • Click on Conditional Formatting
  • See if, under 'Condition,' "Field Has Focus" has been selected.

If so, use the ForeColor and BackColor Icons to adjust it to your needs. When you do the demo box will show you how it will look under that condition.

Linq ;0)>

This post has been edited by missinglinq: Mar 12 2012, 12:05 PM
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 19th May 2013 - 12:37 AM