Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a form from a field on another form

Status
Not open for further replies.

nhtraven

Technical User
Dec 10, 2000
114
0
0
US
This is the problem > i have a form that i want person to enter <yes/no data type> if the answer is yes i want the form to pop up. <this information is only entered if the answer is yes otherwise this information is not needed> Which it does, but the information it is saving in second form to the table, is not related to the information in form 1. I think my relationships are messed up.
maybe make this clearer.

tblOne tblTwo
field1 <yes/no> field1<text>same field
Field2 field3

many more fields in each table.
but that is jist of it. The relationship i have is between field1<tblOne> <----one to many---> field1<tblTwo>
should this be one to one? if so how do i set it to that?
thanks
 
Hi

Let me see if i understand the situation.

You have a form that displays some information?

After the user fills in some details they get to a yes/no field. If the answer is no they simply continue with what ever they are doing.

if the value is yes, you want to pop up another form to get additional information.

Thats not hard, what i don't quite understand is a relationship on a yes/no field?? isn't the optional data being entered related in some other way to the first table other then Yes/No?

can you try to give a little more information, as you really need the relationship between 2 tables to be based on some unique identifying field(s)

regards



Robert Dwyer
rdwyer@orion-online.com.au
 
Yes the optional data is related in another way. Thru a primary key number field, ie LotNo. The form that opens for the optional data takes the information and stores it but not in relation to the first table.
What i am trying to do is not have a bunch of empty fields in a table. So i created two tables. One for regular information, table1, and one for the optional data, table2 . I have tried the relationships. But it is not a one to many relationship. The optional data, table2, should be realated to the record in table1. I have looked at the join field in the relationship box, but i am not sure how to join them, or if that is the answer.
I want the first form to call the second form and the second form to goto the specific LotNo from form one.

I hope this is making sense.
 
Hey, try this.
Create an event procedure in the After Event property of the control containing the <yes/no data type>. Make your yes/no a drop down list. Then try something like this:
If [controlname].Column(0) = True Then
DoCmd.OpenForm (Formname)
End If
 
OK >> thru THIS WONDERFUL!!!! forum, i found exactly what i was looking for, when i searched it, huzza posted it. ALL i needed was to add this code to my DoCmd...
&quot;[CustomerID] = Forms![Site Information Form]![CustomerID]&quot;
and Viola!!! it works like a champ! thanks all = )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top