D
David Baldacchino
I know...lookups in Tables are BAD, EVIL I get it. I understand it, even
with my limited knowledge.
However I'm curious whether the following can be done.
Let's say I have a table (MyTable) and one of the columns is "CompanyID". In
the "Products" column, I set the the table to display a list box control and
created a lookup field from a Products table, selected Table/Query and built
a 3 column query containing the ProductID, Product Name and CompanyID. I set
the Bound Column to 1 (I want to store ProductID, but want to see Product
Name in the listbox), Column Count to 3 and the column widths to 0";1";0". I
would like to filter this lookup listbox in the datasheet by the CompanyID of
the record I'm editing. I tried setting the Criteria of the lookup query to
be equal to [MyTable].[CompanyID] but the problem is that when I open the
table, I get prompted to enter a value and it will persist when I edit
different records (the filtering doesn't change when I edit a different
record with a different CompanyID).
Is there any way to achieve this in a datasheet lookup query? Again...I'm
looking for a temporary fix to enter some data quickly and I know how to
create a form to achieve what I'm after, but am very curious if this can also
be done with a field lookup and a query. Thanks!
with my limited knowledge.
However I'm curious whether the following can be done.
Let's say I have a table (MyTable) and one of the columns is "CompanyID". In
the "Products" column, I set the the table to display a list box control and
created a lookup field from a Products table, selected Table/Query and built
a 3 column query containing the ProductID, Product Name and CompanyID. I set
the Bound Column to 1 (I want to store ProductID, but want to see Product
Name in the listbox), Column Count to 3 and the column widths to 0";1";0". I
would like to filter this lookup listbox in the datasheet by the CompanyID of
the record I'm editing. I tried setting the Criteria of the lookup query to
be equal to [MyTable].[CompanyID] but the problem is that when I open the
table, I get prompted to enter a value and it will persist when I edit
different records (the filtering doesn't change when I edit a different
record with a different CompanyID).
Is there any way to achieve this in a datasheet lookup query? Again...I'm
looking for a temporary fix to enter some data quickly and I know how to
create a form to achieve what I'm after, but am very curious if this can also
be done with a field lookup and a query. Thanks!