View Full Version : Field based on information in another field


Lyconal
06-01-2009, 06:29 AM
Hi guys,

I am working on a database for stock movements, and need the following to happen:

On the TransactionHistory table, when a StockItem has been picked, the Warehouse list needs to filter based on the StockItem.

The following is the setup for my dBase:

StockItem
Warehouse
WarehouseItem (Links StockItem to Warehouse)
TransactionHistory
TransactionType

All tables contain normal fields you would expect to find, and all have ID autonumber PK's.

How would I get the Warehouse field in the TransactionHistory to filter, based upon the StockItem from StockItem or WarehouseItem? (I cannot see an easy way to insert a SQL statement from Access 2007 - Any most of my time is spent in SQL SERVER 2005)

Cheers

pbaldy
06-01-2009, 07:04 AM
On a form, you would do it with cascading combos:

http://www.baldyweb.com/CascadingCombo.htm

I don't think you can do it directly in a table, which most of us don't recommend letting users into anyway.

Lyconal
06-01-2009, 07:14 AM
It was a form I was wanting to achieve it from.

Cheers