开发者

Programmatic access Linked Master / Child fields in Access

开发者 https://www.devze.com 2022-12-27 07:42 出处:网络
How do I programmatically get the current linked value on a subForm in access. The documentedstring property subForm.LinkMasterFields t开发者_开发技巧hrows an error when I try to reference it. LinkMas

How do I programmatically get the current linked value on a subForm in access. The documented string property subForm.LinkMasterFields t开发者_开发技巧hrows an error when I try to reference it.


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.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号