Referencing a datasheet row

A

ADixon

Anyone have an idea how to reference a particular row in a subform datasheet?
i can pull the details for the top row but don't know how to reference e.g
the selected row.

Any help is greatly appreciated
 
C

Cheese_whiz

Hi ADixon,

Put a control in the form header (the form inside the subform control) and
make it bound to the primary key field of the underlying recordsource. You
can set the control visibility to 'no' so that it doesn't display, or even
set the entire form header not to display (though, I usually end up doing the
former).

During development, leave that control visibility set to 'yes'. As you will
see, whenever you select a row in the subform, the primary key value for that
record will display in the control in the header of your subform control's
form.

Then when you want to refer to a selected row, you just refer to the record
where the primary key value is equal to the value in that control in your
form header (again, the form inside the subform control).

HTH,
CW
 

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