MS Access Table field Limit based on another field
Posted on 2012-09-07
I have an Access database table that is used to specify details about various sensors. A sensor could be, for example, a PRESSURE sensor so I have a column for SensorType and use a lookup that has fields such as: PRESS, TEMP, FLOW, etc.
Next, I need to have a column that holds the MeasurementUnits of the sensor, for example, PSI, kPa, MPa (for pressure) or F, C, R, K (for temperature). This column is to be used to enter the actual information from the sensor.
After that, I want to have two additional columns, one for English Units and one for metric units. This will tell a program I am writing which units to display when in English and in Metric.
My problem is this: After I select the SensorType, I want to limit the choices for the MeasurementUnits column based on the SensorType. I don't want people to choose a SensorType of TEMP and then be able to choose a MeasurementUnits of PSI (a pressure)
I think once I know how to do the first one I will be able to use the same technique to limit the choices EnglishUnits and MetricUnits.
I don't want the user to use a form to fill out this data, I just want them to fill out the actual database table.
Also note, sometimes all of the units are the same, for example, Relative Humidity is expressed as % (percent) no matter English or Metric.
Thanks in advance for your help,