How to return a selected row from a datasheet popup

J

JohnBrim

I want the user to be able to click on one specific row in a datasheet popup
and then return the entire row to the calling code for processing.

Questions:
How does one identify the row the user has clicked on in the popup form?
How best to return the selected row to the calling code?

Sorry if this has been asked and answered but I searched for 2 hours and
couldn't find much.

Thanks in advance!
 
A

Arvin Meyer [MVP]

The best way to identify a row is my its Primary Key value (usually and ID
field) If the form is still open and the record is selected, you can just
refer directly to the text boxes on the form:

Me.txtMyText = Forms!Forms2!txtMyText

If the form isn't going to stay open (even if it is hidden) build a
recordset based on values in that record, from the ID (primary key) stored
in a global (public) variable.
 
Top