Linking to the same name between forms

  • Thread starter Thread starter Frank Batskor
  • Start date Start date
F

Frank Batskor

Okay here is my headache I hope that I can explain it.

Two seperate forms, both have one field in common, when I
open form one and find the correct company, I wish to open
form two to the same company.

So what I wish to do is pass a currently displayed value
from one form to another and use that value to open the
second form at the same value.

IE. Find correct Company_Name in form1 click on button to
form2 and open on same Company_Name.

I hope that I made this easy to understand.

Thanks
 
Frank said:
Okay here is my headache I hope that I can explain it.

Two seperate forms, both have one field in common, when I
open form one and find the correct company, I wish to open
form two to the same company.

So what I wish to do is pass a currently displayed value
from one form to another and use that value to open the
second form at the same value.

IE. Find correct Company_Name in form1 click on button to
form2 and open on same Company_Name.

Use the OpenForm method's WhereCondition argument when you
open the second form:

DoCmd.OpenForm "secondform", _
WhereCondition:= "[Company_Name]=""" & Me.[Company_Name]
& """"
 
Back
Top