Reputation: 1563
How do I programmatically get the current linked value on a subForm in access. The documented string property subForm.LinkMasterFields throws an error when I try to reference it.
Upvotes: 1
Views: 689
Reputation: 15384
LinkMasterFields will give you the name of the field it's linking on. Try this and see what it says
MsgBox Me.subForm.LinkMasterFields
If you want to get a value from a field on the subform you can get it like this
MsgBox Me.subForm.Form.field_1
or directly with
MsgBox subFormRealName.Form.field_1
''// n.b.: you're running with scissors if you do this - especially if you have
''// the possibility of having the same subForm open multiple times at once
''// e.g., on the same form or on two different forms at once.
Upvotes: 1