473,325 Members | 2,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Field colors

Using Access 2000.
I have a form with about a dozen fields .

As each field gets or loses focus I change the background color between
white (lost focus) and yellow ( got focus).

Makes a nice effect.

I want to surpress the text highlighting that happens when a field is
selected.

Any ideas how to do this?

Dec 19 '06 #1
5 2000
RICHARD BROMBERG wrote:
Using Access 2000.
I have a form with about a dozen fields .

As each field gets or loses focus I change the background color
between white (lost focus) and yellow ( got focus).

Makes a nice effect.

I want to surpress the text highlighting that happens when a field is
selected.

Any ideas how to do this?
Tools
- Options
- Keyboard
Behavior Entering Field
(o) Select Entire Field
( ) Go to Start of Field
( ) Go to End of Field

The default is "Select Entire Field". Choose either of the other two.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Dec 19 '06 #2
Thanks Rick

Is it possible to code this into the Access application in stead of
selecting it fromthe toos menu ?

Dick B
"Rick Brandt" <ri*********@hotmail.comwrote in message
news:SL******************@newssvr25.news.prodigy.n et...
RICHARD BROMBERG wrote:
>Using Access 2000.
I have a form with about a dozen fields .

As each field gets or loses focus I change the background color
between white (lost focus) and yellow ( got focus).

Makes a nice effect.

I want to surpress the text highlighting that happens when a field is
selected.

Any ideas how to do this?

Tools
- Options
- Keyboard
Behavior Entering Field
(o) Select Entire Field
( ) Go to Start of Field
( ) Go to End of Field

The default is "Select Entire Field". Choose either of the other two.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


Dec 19 '06 #3
RICHARD BROMBERG wrote:
Thanks Rick

Is it possible to code this into the Access application in stead of
selecting it fromthe toos menu ?
If you are distributing this to others I would not recommend that as it will
affect all of their Access apps, not just yours. On individual forms you
can also code this in the GotFocus Event of each control (which you are
likely already using anyway).

Just set the SelLength property of the control to zero...

Me.ControlName.SelLength = 0

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Dec 19 '06 #4
or to something like

me.controlname.selLength = len(me.controlname)+1

to set the cursor at the END of the field.

Ron

Dec 19 '06 #5
Just answered this same question today for someone else in the "Forms"
section:

'This sets cursor at the end of current text
Private Sub YourTextBox_Enter()
Me.YourTextBox.SelStart = Len(YourTextBox.Value)
End Sub

'This sets cursor at the beginning of current text
Private Sub YourTextBox_Enter()
Me.YourTextBox.SelStart = 0
End Sub

'This selects (hi-lites) all of the current text
Private Sub YourTextBox_Enter()
Me.YourTextBox.SelStart = 0
Me.YourTextBox.SelLength = Len(YourTextBox.Value)
End Sub

--
Message posted via http://www.accessmonster.com

Dec 19 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Paul Rohorzka | last post by:
Hi! I'm currently trying to create a 1x1 Pixel BMP in an OLE field of my mdb. To see how the color is coded in that data, I created several records with some characteristic colors of my pixel...
2
by: Danny | last post by:
HI, I am trying to do a group by such as this: "select code, colors from productdb group by code, colors" I need to sort on the key field, but cannot throw in the 'ordre by key', because i...
6
by: Danny Lesandrini | last post by:
I'm using an Access database to drive a web site and the colors of various table backgrounds are stored in Access. I want users of the Access database to be able to select colors for the site, but...
0
by: Filo | last post by:
Hello, Design nice PivotTable or PivotChart (selecting fileds,captions, colors, fonts, order of fieds etc.) sometimes takes more then 1 hour and I hate when after this my boss (or I self) ask me...
4
by: Kurt Schroeder | last post by:
I have a data grid with about 20 repeating items. they data: colors, red colors,blue colors, green Animals cat animals bird people, Tom people, Bill people, Kris
2
by: aldeb | last post by:
My dilemma is as follows. I have a continous form that I am using as a Visual Display Form to show the status of records (SoeCodes). What their status currently is and what they have been. I have 6...
2
by: momcoder | last post by:
I'd like to change the background color in fields on a form when the user has made an entry in them. I'm having trouble figuring out the correct way to refer to the background color of the elements...
1
by: ebernedo | last post by:
Hey guys, I have two main questions First off (pictures are kind of blurry) I have this table http://i197.photobucket.com/albums/aa109/ebernedo/DiscTable.jpg And thats my database I use my...
2
by: Vinnie the Rat | last post by:
I need to provide a pick list for a data entry field. I do everything but take the selected value and get it into the dataset for eventual update to the the database. I can show the field of the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.