Yes, the LinkMasterFields and LinkChildFields can contain multiple fields,
and the combination of fields will be used to synchronize the main form and
the form embedded in the subform control. From what I scanned quickly here,
it does not seem that the StudentID would enter into accessing tblWorkshop
to get the price, so I don't see how that would apply.
When you are referring to the control [WorkshopID], is that a ComboBox? If
so, the RowSource would identify the table from which you are selecting
data, and there would be no need for the ID to be in the LinkMasterFields
and LinkChildFields (because their only use is to synchronize data in the
main and sub forms). And, of course, your RowSource must include all the
Fields you need... but it can be a Query that only references, say,
WorkshopID, WorkshopName, and Price. I strongly recommend that you do not
use Name or Date for Field names -- they are Access reserved words and can
cause you all kinds of unobvious problems.
(If you did only use the three Fields in the RowSource Query, then Price
would be (2), not (6) -- it refers to the Column property of the Combo,
determined by what you use as RowSource, not to the underlying table
itself.)
One thing that might be causing you a problem is if, as it appears to me you
may be, you are using the same name for the Control as for the Field that is
the Control Source. Yes, the Access wizards do this, but it can be
confusing... so many of us use some naming convention (the one I used is
called the Reddick Naming Convention... you can Google on that, or search at
http://support.microsoft.com for details) that appends an identifying
prefix, e.g., "cbo" for Combo, and avoids possible confusion. Try renaming
your combo to cboWorkshopID and your and see if that helps.
Larry Linson
Microsoft Access MVP
"C Y" <cy*******@cox.net> wrote in message
news:40**********************@news.newsgroups.ws.. .
Thanks Bradley. The item that is the source is "Price" from tblWorkshop
and is the 0,1,2,3,4,5,6th element of each record. I want this value to
go to tblScheduleDetails "UnitPrice" field. So price is the 7th field
(Column(6)) but I'm wondering if I might need to link that table to the
form? Right now the master and child references both contain StudentID
which is contained in both tblStudent and tblScheduleDetails. I need to
get to tblWorkshop which would be pointed to by WorkshopID. Can there
be more than one entry in the master and child fields?
Like separated by ";"s?
Best regards,
Chuck
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!