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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform on main form - having problems with main forms key field

Status
Not open for further replies.

ciskris

Programmer
Jun 22, 2001
13
0
0
US
A little background first:

I have a main data entry form where you choose a Contract ID from a drop down and an autonumber field ID is activated when you tab form it to the drop down. This autonumber ID is the key for the table under the form. On this main form I have a subform that only contains checkboxes for the subform that queries a different table from the main forms. When the form opens, the cursor is focused on the autonumber field and when you tab to the drop down it pulls up a number. Then you are able to choose a Contract ID from the drop down. I am having trouble sending the autonumber ID and the drop down Contract ID to the subform, so the table under the subform can be populated with both IDs.

I also have the same form as an edit form so that the user can change any of the information that has not been added or needs to be changed after the intial data entry. But on the edit main form, its subform is blank when the form opens. The way I have the main edit form open, you must first go to a search form and find the Contract ID from a drop down and the search form and then you can press a button to that edit form you need to change info on. The Contract ID is sent to the edit form and when it opens it shows the Contract ID in the text box for it and all other fields associated with that Contract ID that have data in the underlying table will populate those fields.

My questions are 1)How on the Main Data entry form do I send the Contract ID and autonumber ID to the subform?
And 2)How do I get the subform on the Main edit form to show with the Contract ID and autonumber field ID and not open blank with no fields showing?

Any guidance on this matter would be great. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top