How to highight record on Datasheet

  • Thread starter Thread starter les
  • Start date Start date
L

les

Hollo,

I'm trying to highlight a record (or even one by one field) on a datasheet
subform. I can highlight fields or records on the "single" or "continues"
forms but I don't know if it is possible to do something like this on the
"datasheet" form.

Basically, I want to highlight a selected record after the users click on
one of the fields. Also, the fields must allow data modification.

I use MS Access 97.

Any help is greatly appreciated.
Les
 
Not possible, if you want that kind of funtionality you'll need to use a Grid control MSGrid, have a look under the More Controls button or check you referrence availabilty for Microsft Grid Control grid32.ocx but remeber if your mdb file is to sit on a multiple environment each user too needs to have this ocx file available

cia
KM
----- les wrote: ----

Hollo

I'm trying to highlight a record (or even one by one field) on a datashee
subform. I can highlight fields or records on the "single" or "continues
forms but I don't know if it is possible to do something like this on th
"datasheet" form

Basically, I want to highlight a selected record after the users click o
one of the fields. Also, the fields must allow data modification

I use MS Access 97

Any help is greatly appreciated
Le
 
With a form in Datasheet view on Access97 the only solution is:

Private Sub Form_Current()
DoCmd.RunCommand acCmdSelectRecord
End Sub

This will select the entire row when the user clicks on any field of a
row.

If you move to Access2000 or higher Conditional Formatting is supported
which would allow you finer control over the individual control's
properties.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Thanks this command seems to be great. That's what I want.

However, I have a problem with the fields in the first column. When I click
on the first field in the selected record and then click on the fields below
or above in the same column the previous field is not repainted and it stays
highlighted. After clicking a few times you can end up with the entire
column highlighted. All the other columns are OK. But when I made any other
column to be first it had the same problem. So there must be a bug or some
trick that doesn't repaint or reset that first column. If you have solution
for it please let me know.

Thanks,
Les
 
me.refresh

....fixes the problem

Les


les said:
Thanks this command seems to be great. That's what I want.

However, I have a problem with the fields in the first column. When I click
on the first field in the selected record and then click on the fields below
or above in the same column the previous field is not repainted and it stays
highlighted. After clicking a few times you can end up with the entire
column highlighted. All the other columns are OK. But when I made any other
column to be first it had the same problem. So there must be a bug or some
trick that doesn't repaint or reset that first column. If you have solution
for it please let me know.

Thanks,
Les
 
Depending on your recordsource for this form it might be better to issue
a me.Repaint instead of me.Refresh.
:-)
--

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