Synchronization and references

  • Thread starter Thread starter vbnetman via AccessMonster.com
  • Start date Start date
V

vbnetman via AccessMonster.com

I’m having a problem with respect to a reference issue and synchronization of
the two forms, and am having trouble resolving it. I’m trying to create a
tabbed form and need some help.

For the example, I have 2 existing forms; frm_Units and form1000. Form1000
has a subform on it that’s not of concern at this point. Each of the 2 forms
share a common field, unitID. To create the tabbed form, I started by
creating a new unbound form and named it form5000. To it I added a two tab
control and dragged frm_Units to tab one and form1000 to tab two. I then
saved and closed form5000

What I need to do is synch two forms; when unitID changes in frm_Units I need
to have it automatically changed in form1000. I’ve tried in the OnCurrent
event of frm_Units:

Forms!form5000!form1000.Form!UnitID = Me.UnitID but get an invalid reference
error.

Also tried; Me.Parent.form1000.Form.Requery

So, I’m looking for direction from anyone who may care to jump in.\

Thank you in advance
 
When you added the two forms as subforms on Form5000, what name was assigned
to the subform controls? Depending on how you added the forms as subforms,
those controls may not have the same names as the forms being used as the
subforms. You need to use the control names in your expression.
 
Hi Douglas,
Yes I've been thru that one. I'm now thinking that the recordsource property
is not set on one of the forms is causing the problem. I'm looking at that
now.
When you added the two forms as subforms on Form5000, what name was assigned
to the subform controls? Depending on how you added the forms as subforms,
those controls may not have the same names as the forms being used as the
subforms. You need to use the control names in your expression.
I'm having a problem with respect to a reference issue and synchronization
of
[quoted text clipped - 23 lines]
Thank you in advance
 
OK the recordsource is set but the synch is still off...
When you added the two forms as subforms on Form5000, what name was assigned
to the subform controls? Depending on how you added the forms as subforms,
those controls may not have the same names as the forms being used as the
subforms. You need to use the control names in your expression.
I'm having a problem with respect to a reference issue and synchronization
of
[quoted text clipped - 23 lines]
Thank you in advance
 
What do you mean by "the synch is still off"?

Have you set the LinkChildFields and LinkMasterFIelds correctly for the
subforms?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


vbnetman via AccessMonster.com said:
OK the recordsource is set but the synch is still off...
When you added the two forms as subforms on Form5000, what name was
assigned
to the subform controls? Depending on how you added the forms as subforms,
those controls may not have the same names as the forms being used as the
subforms. You need to use the control names in your expression.
I'm having a problem with respect to a reference issue and
synchronization
of
[quoted text clipped - 23 lines]
Thank you in advance
 
Douglas,
I re-checked and found that the link master / child fields were not correct.
Got it!

Thank you
What do you mean by "the synch is still off"?

Have you set the LinkChildFields and LinkMasterFIelds correctly for the
subforms?
OK the recordsource is set but the synch is still off...
[quoted text clipped - 10 lines]
 
Back
Top