I have 2 related tables - let's call them OrderH and OrderD.
In my OrderH table the primary key is OrderNum, but I also have a column called OrderType.
The type of items that can be placed on an order depend on the OrderType value.
When creating a new order and adding items to the OrderD table, I want to use a lookup, so that the items to be added are selected from a table called ItemList.
There is also an OrderType column in the Itemlist table, and for any order, items can only be added to the order if the ItemList.OrderType = OrderH.OrderType
Therefore, when creating an order, the user will first create a header and specify the Order Type. When entering details for the order, the user should only be able to select items where the OrderType corresponds to the header record.
How can I construct a WHERE clause in the Lookup Wizard so that it only displays these records?
Any suggestions would be appreciated.