It doesn't work.
I probably wasn't clear. The datasheet is on a Form B. And Form A contain Form B as a subform. I need to get the ID of the selected item on the datasheet.
Vic's I believe you reversed your bang & dot?
"[ID] = " & [Forms]![Search Customers]![Search Customers Subform]Form![SubformControlName
Where are you calling your code from, we're assuming Form A,
which is the Parent Form?
Me![Search Customers Subform].Form!pkID, should give you the current
record, on the sub form, no matter what method or action
you use it with.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.