Highlighting the current rec programatically in datasheet subform

G

Guest

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

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top