one to many to one

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form (employees). It has tabs that show general employee info and
another tab that gives information concerning each employees uniform
allowance. The uniform allowance information is organized into a table and
linked to the main employee table in a one to many relationship. Everything
is working great. BUT... I want to show on the second tab of the form the
uniform allowance information. I want a datasheet view in the top section
showing individual uniform transactions (transaction date, vendor, amount).
At the bottom I want to show a text box that reveals an information related
to the transaction.

I can pull this off. But as I click on each individual transaction the
details in the text box do not update. I know this can be done because
there is a nifty template that MS has on the Access website showing a contact
management system. It lists call info and details in just this manner. I
can not for the life of me duplicate it.

I know I could just copy the template and rename the fields. But that won't
help me learn.

Any ideas? You can find the template in the templates section of the MS
Access website. Just search for Contact Management.

I hope someone can help.
 
I can pull this off. But as I click on each individual transaction the
details in the text box do not update. I know this can be done because
there is a nifty template that MS has on the Access website showing a
contact
management system. It lists call info and details in just this manner. I
can not for the life of me duplicate it.

I know I could just copy the template and rename the fields. But that
won't
help me learn.

In the OnEnter event of the field you'd be clicking in put

Me.Refresh

Tom Lake
 
looking at the Calls form, specifically the subforms' Form properties, you
can see that both subforms are bound to the Calls table. the second subform,
which shows only the Notes field, is indirectly synchronized to the first
subform, which shows the other relevant fields in the Calls table, in
Datasheet view.

if you look closely at the main form, you'll see that there is an unbound
textbox named CallID, that is almost hidden by the first subform (and has
its' Visible property set to No, so the user never sees it). the
ControlSource of the textbox is a reference to the primary key field of the
first subform - CallID.

take a look at the LinkChildFields and LinkMasterFields properties of the
second subform. the LinkChildFields property is set to "CallID", which
refers to the primary key field in the Calls table - which is the
RecordSource of the subform. the LinkMasterFields property is set to
"CallID", which refers to the CallID textbox on the main form. that's how
the two subforms are synchronized - it's a standard solution, though it
might have been easier for you to figure out if the unbound text box on the
main form had been named txtCallID, instead of CallID.

hth
 
Thanks Tina, that worked perfect. I saw the hidden text boxes but didn't
catch the one on the main form tab.
 
Back
Top