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

Linking 2 subforms 1

Status
Not open for further replies.

molly

Technical User
Jul 17, 2000
219
US
I am having 2 problems. In my subform1, I can choose a category value fine. Then in subform2, I need to choose a value which pertain only to the subform1 choice. I cannot get it to work. EG in my little sample file, if I choose baseball MITTS in subform1 cboFlcID field, I would like to pick from subform2 cboProductID field the pertainent mitts choices. In other words, restrict the possible subform2 choices for a certain subform1 row. If i pick Bats in subform1 then i would like to see which bats in my subform2 pick.

The 2nd problem is in subform1. Sometimes i forget, and I try to add a cboFlcID answer in subform1 a second time. I would like an error message that i am duplicating the cboFlcID field for the given customer. EG if i tried to add 11 in cboFlcid customer record where i already chose an answer of 11.

I seem to be real close but no cigar.

I hope that this is a good request. I tried using the Northwind example but it is different. In my case, i have a customer, a category (flc) and a product.

Thanks so much.
Molly
 
Code:
SELECT [tblMaster Product Detail].ProductID
FROM [tblMaster Product Detail]
WHERE ((([tblMaster Product Detail].FLCid)=[forms]![2008frm Startup]![2060sfrm Order Subform1].[form]![FLCid]));
[code]

[code]
Private Sub cboProductID_Enter()
  cboProductID.Requery
End Sub
 
MajP - this works great. I will now use this coding into my real database. Thanks so much for your help. Molly
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top