Linking to the same name between forms

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
 
M

Marshall Barton

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]
& """"
 

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

Similar Threads


Top