How to create a table with different units of measure e.g. mA, uH, %, checkbox, ohms

Vector

New member
Local time
Yesterday, 19:11
Joined
Jun 27, 2017
Messages
6
Hello,
I have three tables (m-t-m):
-tblPart: PartID, PartNumber, PartDesc
-tblTest: TestID, TestName, PrameterNo, ParameterDesc, ParameterReqMin, ParameterReqMax, ParameterUnit
-tblPartTest: PartTestID, PartIDFK, TestIDFK, ActualReading

Question:
How do I setup:
-tblTest with different units (e.g ParameterDesc = Workmanship,
ParameterReqMin = blank, ParameterReqMax = Blank, ParameterUnit = Check(y/N)
-tblPartTest: ActualReading = Checkbox, or Number, LongInteger, % etc
 
You can't setup field as different UNITS such as mA, V, ohms etc.
NOTE: I'm guessing uH = microhenrys?

You need to use standard Access datatypes - almost all are likely to be number - choose the appropriate type - probably double

Where appropriate you could format as %

There is a yes/no (boolean) datatype which you would use for ActualReading & ParameterUnit fields

Do a Google search for Access datatypes
 
You could have a quantity field as a single or double, or whatever numeric type makes sense for your purpose, and then a UnitType field. UnitType could link back to a tUnitType table, or just be strings that you enter into the UnitType. Then you could filter the list by UnitType and perform calculations only on Units of the same type.

Imagine a table structure like this, for example's sake.
tResult
ResultID (PK)
TestID (FK to the overall test suite this result is a member of)
UnitTypeID (FK to the UnitType of this result)
Quantity
DateTime

tUnitType
UnitTypeID (PK)
UnitText
Description
Does that make sense at all?
Mark
 
I would separate the multipliers and units.
 
I don't know where you are going with this but as long as you have a UOM on each record and the data types are identical, each row can have a different UOM. Of course if you are working with a set of data where the rows have different UOM's, and you want to do arithmetic with the values, you are responsible for figuring out what needs to convert to what.
 

Users who are viewing this thread

Back
Top Bottom