Highlight selected record

  • Thread starter Thread starter Tom Lewis
  • Start date Start date
T

Tom Lewis

How can I highlight the currently selected record in a
form in datasheet view? I would like the entire row for
the current record to be highlighted, (as if the record
selector were clicked), as the user moves through the
records.

It seems that there must be a property I can set using an
OnCurrent event, but I cannot figure out which property...

Thanks for any help.

Tom
 
Tom, Try this in properties of the field on mousemove:
Private Sub CLOSE_MouseMove(Button As Integer, Shift As
Integer, X As Single, Y As Single)
Me.CLOSE.FontBold = True
End Sub
When you move the mouse over the field it highlights.

SF
 
See:
http://www.lebans.com/conditionalformatting.htm
New Feb 08,2002. Added support for Datasheet view and SubForms.

A2KConditionalFormatting.zip is a sample MDB demonstrating how to
programmatically setup Conditional Formatting to simulate:

1) Highlighting of the Current Row for a Form in Continuous or Datasheet
View

2) Highlighting of Alternate Rows for a Form in Continuous or Datasheet
View

Version 2.7

Added sample demonstrating how to achieve a background
Hover/Highlighting of rows for a form in Continuous view.

Version 2.3

Added sample demonstrating how to achieve pseudo enable/disable of an
unbound control on a form in Continuous View.

Version 1.9

Added sample form to show how to apply conditional formatting to based
on a Boolean(Yes/No) field.

Verrsion 1.8

Starting to cleanup code and add comments!

Version 1.4

First release

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Thanks SF and Stephen,

But what I want is is a bit different, (and simpler, I
think). To clarify, the datasheet form in question is
actually a subform used to select the active record for
its parent form, and since none of the fields in the
subform can be edited, when the user cursors to or clicks
anywhere on a record I just want the entire row to be
selected, and to remain highlighted (reversed) until
another record is selected.

Essentially, I want to produce the same effect as if the
user clicked on the record selector whenever a new record
becomes current, regardless of how the record becomes
current.

I think what I need to know is what property is affected
when a datasheet's record selector is clicked? If such a
property exists and is accessible, then an OnCurrent event
could be used to manage the selection and highlighting of
the current row.

Is that possible?

Thanks again,

Tom
 
Tom, my first answer is the only solution for Forms in Datasheet view.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Hi Tom,

On the form's current event, call the following code, this may be what you
are after.

Application.RunCommand acCmdSelectRecord

Please feel free to reply to the threads if you have any concerns or
questions.


Sincerely,

Alick Ye, MCSD
Product Support Services
Microsoft Corporation
Get Secure! - <www.microsoft.com/security>

This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
| Content-Class: urn:content-classes:message
| From: "Tom Lewis" <[email protected]>
| Sender: "Tom Lewis" <[email protected]>
| X-Tomcat-NG: microsoft.public.access.forms
|
| How can I highlight the currently selected record in a
| form in datasheet view? I would like the entire row for
| the current record to be highlighted, (as if the record
| selector were clicked), as the user moves through the
| records.
|
| It seems that there must be a property I can set using an
| OnCurrent event, but I cannot figure out which property...
|
| Thanks for any help.
|
| Tom
|
 
Great! :-)


Sincerely,

Alick Ye, MCSD
Product Support Services
Microsoft Corporation
Get Secure! - <www.microsoft.com/security>

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| X-Tomcat-NG: microsoft.public.access.forms
|
| Thanks Alick,
|
| That is exactly what I was looking for.
|
| Tom
| >-----Original Message-----
| >Hi Tom,
| >
| >On the form's current event, call the following code,
| this may be what you
| >are after.
| >
| >Application.RunCommand acCmdSelectRecord
| >
| >Please feel free to reply to the threads if you have any
| concerns or
| >questions.
| >
| >
| >Sincerely,
| >
| >Alick Ye, MCSD
| >Product Support Services
| >Microsoft Corporation
| >Get Secure! - <www.microsoft.com/security>
| >
| >This posting is provided "AS IS" with no warranties, and
| confers no rights.
| >
| >
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "Tom Lewis" <[email protected]>
| >| Sender: "Tom Lewis" <[email protected]>
| >| X-Tomcat-NG: microsoft.public.access.forms
| >|
| >| How can I highlight the currently selected record in a
| >| form in datasheet view? I would like the entire row for
| >| the current record to be highlighted, (as if the record
| >| selector were clicked), as the user moves through the
| >| records.
| >|
| >| It seems that there must be a property I can set using
| an
| >| OnCurrent event, but I cannot figure out which
| property...
| >|
| >| Thanks for any help.
| >|
| >| Tom
| >|
| >
| >.
| >
|
 
Back
Top