If I need more flexibility in a lookup dropdown, I'd like to use a form variable in my lookup query.
Say I have a dropdown called PartNumber, and I want to use the selected field in a subsequent dropdown that will require a table join.
The query would look something like this:
SELECT pro2.Mold_Center
FROM dbo.production_partmaster pro
LEFT OUTER JOIN dbo.production_moldtypes pro1 ON pro.moldtype=pro1.id
LEFT OUTER JOIN dbo.production_moldcenter pro2 ON pro1.id=pro2.MoldType
WHERE pro.partno = <selected previous dropdown PartNumber>.
How do I get the <selected previous dropdown PartNumber> from the form?
Any help is appreciated!!
Thanks,
John