A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

highlight cell that cursor is in



 
 
Thread Tools Display Modes
  #1  
Old February 28th, 2006, 04:55 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default highlight cell that cursor is in

I am trying to figure out how to highlight a row all the way across (several
columns) a table to show where the curor is. So if the cursor is on row 22
and in the 4th column, I want the entire row to be highlighted. If this is
not possible then how can I highlight just the text field that the curor is
in?

Thanks
  #2  
Old February 28th, 2006, 05:10 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default highlight cell that cursor is in

if you're using Excel (rows and columns), suggest you post your question to
an Excel newsgroup. if you're using Access (records and fields), then you
can't do it in Datasheet view of a *table*. instead, use a form to view your
data and, in A2000 or newer version, set Conditional Formatting (under
Format on the menu bar in form design view) on each bound control in the
form to change the BackColor property using the FieldHasFocus option.

hth


"JMspecial" wrote in message
...
I am trying to figure out how to highlight a row all the way across

(several
columns) a table to show where the curor is. So if the cursor is on row

22
and in the 4th column, I want the entire row to be highlighted. If this is
not possible then how can I highlight just the text field that the curor

is
in?

Thanks



  #3  
Old February 28th, 2006, 06:45 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default highlight cell that cursor is in

Well, you can do it via code, but there the method is very clunky.

The code would look like:

Dim ctl As Control
Set ctl = Screen.ActiveControl
ctl.Parent.Controls(0).SetFocus
ctl.Parent.SelWidth = ctl.Parent.Count

Now, the question remains on how do you start this code. The only way
I can think of is to use a hidden form with a timer to check every so
often. Alternatively, datasheet views would work as well.

On a datasheet view, simply add this to the OnCurrent event, and you
will have exactly what you are looking for.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I want to use a formula in excel to highlight a cell 30 days prio MWad22368 Worksheet Functions 1 February 13th, 2006 02:51 AM
Instead of a negative number, I'd like to show zero... Dr. Darrell Worksheet Functions 6 December 7th, 2005 08:21 PM
Formulas to highlight cell if condition is met hmmm General Discussion 2 November 3rd, 2005 10:09 AM
up to 7 functions? ALex Worksheet Functions 10 April 12th, 2005 06:42 PM
IF E3 & E10 = TRUE set this cell to "Yes", else set to "No" Timothy L Worksheet Functions 5 August 27th, 2004 02:28 AM


All times are GMT +1. The time now is 05:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.