How do I filter a subform lookup based on a main form lookup?

How do I filter a subform lookup based on a main form lookup?

We represent multiple vendors as commissioned sales reps.  We track our sales by entering them on a Purchase Orders tracking form.  One of the fields on the main form is Vendor, a lookup from the Vendors table. 

The form has a subform to select the Product sold, and enter the cost and order quantity.   The subform field Product is a lookup from the Products table.  I would like to limit the list of Products in the dropdown to only those sold by the Vendor that was selected on the main form.  I can't figure out how to do this.  I tried creating an On User Input variable on the main form after selecting Vendor.  But when I try to set that as a filter on the subform I get the message "variable Temp.Vendor not defined." 

Any help would be appreciated.  Sorry if this has been solved before; I see where a number of people have asked this question in the past, but I don't see the answer to this specific question. 

    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ




                              ご検討中の方