Highlighting the current rec programatically in datasheet subform

G

Graham

Can anyone tell me how I can programatically highlight the current record in
a subform - in datasheet view. (as if I had clicked on the record selector on
the left-hand side of the datasheet).
 
R

RoyVidar

Graham said:
Can anyone tell me how I can programatically highlight the current
record in a subform - in datasheet view. (as if I had clicked on the
record selector on the left-hand side of the datasheet).

You can use

DoCmd.RunCommand acCmdSelectRecord

If you're going to to this from a main form, i think you'll need to
set focus to the subform first.
 
G

Graham

Thanks Roy... Just what I needed.

You were right... I had to set the focus to the subform and then call a
public procedure which I placed in the subform to execute your code snippet.
 
Top