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

Problems with Subform and Form connection

Status
Not open for further replies.

SandyH

Programmer
Jun 16, 2000
25
US
Hi,<br>I am creating a dbase for doing bid quote in access.&nbsp;&nbsp;I have the bid information form and also a list of items I want included and excluded from our bid.&nbsp;&nbsp;The included and excluded items are also in seperate forms because I want to check mark the one that will be included/excluded and have it print a list. (example:&nbsp;&nbsp;Item Included&nbsp;&nbsp;&nbsp;&nbsp;Yes&nbsp;&nbsp;&nbsp;No<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dampers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;X<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;register&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;X&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;item Excluded&nbsp;&nbsp;&nbsp;&nbsp;Yes&nbsp;&nbsp;&nbsp;No<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;damper&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;X<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;register&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;X<br>Ok now the problem i am having is that these subforms (items included/items excluded)in the main form (bid info)<br>When i fill out a form and then check the appropriate items it works ok.&nbsp;&nbsp;But when I go to the next Bid Info form the subforms stay the same with the check marks and when I change them it changes it for all the main forms.&nbsp;&nbsp;What I want to figure out is how to fix the subforms so that each time I go to a new main form they will default back to just having the list of items with the check marks unmarked but yet the previous forms that I have altered will stay checked the way I had them.<br>Any help will be appreciated.<br>Thank you, Sandy<br>
 
If I understand you correctely both main form and subform are basically one bid hence one record?&nbsp;&nbsp;So what is your primary key bidID or what?<br><br>Is the form based on a query? If so place tblquote (or whatever) and tblItems (or whatever) in the query and join them on bidID. Then select your appropriate relationship.
 
Seconding Myron here, it seems there is a design problem.<br>If you make a mainform and subform which are related to each other on some point, logically the underlying tables are also separate and related on some point.<br><br>Main form would be based on table &quot;bids&quot;,<br>subform would be based on table &quot;bid details&quot;.<br>Table &quot;bids&quot; would be related 1tomany to &quot;bid details&quot; via a &quot;bid ID&quot; field.<br><br>The &quot;bids&quot; table would contain the &quot;bid ID&quot; as primary key typically autonumber, and maybe a bid date, bid place, name representative etc.<br>The &quot;bids details&quot; table would contain the &quot;bid ID&quot;, and info about includes and excludes.<br><br>Create a form based on the &quot;bids&quot; table.<br>Create a form based on the &quot;bids details&quot; table.<br>Copy paste the &quot;bids details form&quot; onto the &quot;bids form&quot; and you will enforce a main/sub form relationship.<br><br>Example:<br>Bid 1<br>id 1 date XXX place yyy<br>&nbsp;&nbsp;Bid 1 details<br>&nbsp;&nbsp;id 1 A included<br>&nbsp;&nbsp;id 1 B excluded<br>&nbsp;&nbsp;id 1 C included<br>&nbsp;&nbsp;id 1 D included<br>Bid 2<br>id 2 date XXY place yyz<br>&nbsp;&nbsp;Bid 2 details<br>&nbsp;&nbsp;id 2 A excluded<br>&nbsp;&nbsp;id 2 B excluded<br>&nbsp;&nbsp;id 2 C excluded<br>&nbsp;&nbsp;id 2 D included<br><br><br>HTH<br>Riny<br><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top