Show Record on subform based on current subform Line ID

B

Billp

Hi,

(Could not think of a better way to describe it).
Assistance please -
I have a main form called Customer.
It has a subform based on a table called tblCustomerContacts.
The sub form is continuous and shows 5 fields only - I suppose it is like a
combo box.
The subform has a goto button.
The Main form is tabbed - four tabs Customer, Contact, Calls. Personal.
On the tab Customer lies the subform CustomerContacts.
It shows precee information.
Now what I would like to happen is that when the goto button is selected on
a particular line of the sub form the tab 'Contacts" is active and the second
part of the subform called SubCustomerContacts is showing the expanded
details of the line in the subform.

I have linked the main form to the subform "subfrmCustomerContacts" thru
CustomerID and the expanded subCustomerContacts the same way.
Both subforms are from the table "tblCustomerContacts"

Now there is a feild LineID for the sub form which is an autonumber for each
entry.
By selecting a particular line in "subfrmCustomerContacts" I am hoping to be
able to show on the other subform "subCustomerContacts" the expanded details.
The filter would have to be the feild "LineID" ???????????????????????.

so the tab becomes active the second subform shows the expanded information
for a contact - there is no pop up.

How please do I do it.
I can't make the original subform have the second part as it has to be
continuous and has a memo field - so I have the two parts.
 
T

tina

Now there is a feild LineID for the sub form which is an autonumber for
each
entry.
By selecting a particular line in "subfrmCustomerContacts" I am hoping to be
able to show on the other subform "subCustomerContacts" the expanded details.
The filter would have to be the feild "LineID" ???????????????????????.

well, you can write code in subformA, to set the filter on subformB. the
syntax would be

Me.Parent!SubformB.Form.Filter = "LineID = " & Me!LineID
Me.Parent!SubformB.Form.FilterOn = True

replace SubformB with *the name of the subform control within the mainform.*
to make sure you get the right name, do the following: open the mainform in
Design view. click *once* on SubformB, to select it. in the Properties box,
click on the Other tab and look at the Name property. replace "SubformB", in
the code above, with the name you see in the Name property.

hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top