Open another form with forms data

electro

Registered User.
Local time
Today, 13:30
Joined
Sep 8, 2006
Messages
27
I have two tables with following structure(and a relationship is made):

Company table:
IDCompany
strCName
strWebb
StrComment

Contact table:
IDContact
IDCompany
strName
strTele
strEmail
strComment

They both have a form (frmCompany and frmContact) but the frmCompany is the main form. When you click in spredsheet list of frmCompany it suppose to open up frmContact with the IDCompany already choosen(and instead of number it will be the Company Name). How will I do that?
I have made a query that contains both tables but how do I open the next form with correct company Name shown?
 
They both have a form (frmCompany and frmContact) but the frmCompany is the main form.
Electro,

This (saying that one of the forms is the MAIN form) suggests that you DO have a parent/child format.
Parent / Child Form relationship = One-to-Many table relationship.
When you click in spredsheet list of frmCompany it suppose to open up frmContact with the IDCompany already choosen(and instead of number it will be the Company Name). How will I do that?
This sounds like you want to filter the subform based on a main form specification. So, with your subform (the child form), you could specify a filter with the OnLoad event of it...
Code:
Me.Filter = (appropriate syntax)

Me.FilterOn = True
 

Users who are viewing this thread

Back
Top Bottom