Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link Master Fields on a complex form

Status
Not open for further replies.

NeilT123

Technical User
Jan 6, 2005
302
GB
I have a complicated form which starts with a single form called IFFertAppln
Then there is a subform FrmIFSFFertAppln
and then there is a Tab control which is on IFFertAppln.
Tab 1 holds a subform frmIfSfFertAppln1

When data in FrmIFSFFertAppln is updated I need frmIFSFFertAppln1 to update and am using the master and child CroppingNumber links to achieve this. However because the forms are not directly linked I have cobbled a link together.

In the "Link Master Fields" of frmIFSFFertAppln1 I have
Code:
Forms!FrmIFFertAppln!FrmIFSFFertAppln.Form.CroppingNumber
and this works most of the time however sometimes on opening the form I get a message saying the CroppingNumber cannot be found however if I go into the form design and then back to the form it works again.

Is this code the correct format to use in a link Fields.

Sorry if this sound very complex.
 
This is probably due to the fact that a subform loads before the main form. So when it looks for that link the parent forms are not even loaded.

However, if
frmIfSfFertAppln1
is a subform of
frmIFSFFertAppln

There is no reason you can not directly link to croppingnumber. Croppingnumber could even be an unbound textbox. So you should have no problem.

linkMasterFields:[CroppingNumber]
linkChildFields: [CroppingNumber]

To demonstrate this concept you can take an unbound form, and add a subform. On the main form put a text box and call it txtBxLink. Link the subform to the main form by
linkMasterFields:[txtBxLink]
linkChildFields:[someField]

Type in the textbox and the subform will filter to the the value in the txtBxLink.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top