V
VT
Hello
I need a little help retrieving data for a subform. The data to retrieve
requires a piece of data from the main form and a piece from a row of the
subform.
All our products need to be licenced before being sold overseas. The
licences are identified by our government by a five figure reference. Every
licence may cite more than one product, and every licence may cite more than
one country, e.g. licence number 12345 may permit sales of Product 1 and
Product 3 to France, Belize and Ireland.
For this reason I have a licences table, products table and a countries
table. There are also two junction tables, ProductLicences and
CountryLicences.
I also have an invoice form with an invoice details subform.There is a
CountryID field on the main form in which the user adds in the country to
which the goods are heading. Each row of the subform identifies individual
products.
What I need is to retrieve and display a Licence number appropriate for the
product in every row of the invoice details subform, and that licence number
must also be appropriate for the country identified in the main form.
If we don't have a licence covering the sale of that product to that
country, then we cannot sell the product to that country.
How can I do this? Will I need to use a subquery, given that five tables are
involved, thanks to normalisation?
Thank you in advance.
I need a little help retrieving data for a subform. The data to retrieve
requires a piece of data from the main form and a piece from a row of the
subform.
All our products need to be licenced before being sold overseas. The
licences are identified by our government by a five figure reference. Every
licence may cite more than one product, and every licence may cite more than
one country, e.g. licence number 12345 may permit sales of Product 1 and
Product 3 to France, Belize and Ireland.
For this reason I have a licences table, products table and a countries
table. There are also two junction tables, ProductLicences and
CountryLicences.
I also have an invoice form with an invoice details subform.There is a
CountryID field on the main form in which the user adds in the country to
which the goods are heading. Each row of the subform identifies individual
products.
What I need is to retrieve and display a Licence number appropriate for the
product in every row of the invoice details subform, and that licence number
must also be appropriate for the country identified in the main form.
If we don't have a licence covering the sale of that product to that
country, then we cannot sell the product to that country.
How can I do this? Will I need to use a subquery, given that five tables are
involved, thanks to normalisation?
Thank you in advance.