简体   繁体   中英

How to bind a textbox to linked child field of subform in MS Access?

So I've got form which has a subform which binds to some textbox on the form. Now within the subform how can I get access to the value in the "child field"?

是有关参考的好手册。

Okay, I found a solution to my problem: the textbox on the form was some content of the currently selected row of a table. Now I added an event to this form for changes of the row-selection ( Form_Current ) which calls a method which manually sets the textbox value directly via a column of the selected table-row like this:

[Forms]![MainForm]![SubForm].[Form]![SubSubForm].[Form].SomeTextBox.SetFocus
[Forms]![MainForm]![SubForm].[Form]![SubSubForm].[Form].SomeTextBox = [Forms]![MainForm]![SubForm].[Form]![SubSubForm].[Form]![SubSubFormTable].[Form]![NeededColumn]

When you link the subform inside Form the filter will work automatically just add the field belong to the child field(ChiledTable). if this not what you mean provide sample of DB.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM