R
RMires
I am trying to create a function which will lookup the volume in a table when
given the gauge of a tank. Each tank has a separate table.
Function Strap(MeasGauge As Double, Tank As String) As Double
Strap = DLookup("[Volume]", "tblStrap"+Tank, MeasGauge =
["tblStrap"&Tank].[Gauge])
End Function
MeasGauge is the gauge
Tank is the tank I want to look up.
The tables are named:
2611tblStrap
2612tblStrap
2613tblStap etc.
The tables each have Fields named Gauge and Volume. I do not know the proper
procedures for referencing tables in a function, especially with variable
table names.
given the gauge of a tank. Each tank has a separate table.
Function Strap(MeasGauge As Double, Tank As String) As Double
Strap = DLookup("[Volume]", "tblStrap"+Tank, MeasGauge =
["tblStrap"&Tank].[Gauge])
End Function
MeasGauge is the gauge
Tank is the tank I want to look up.
The tables are named:
2611tblStrap
2612tblStrap
2613tblStap etc.
The tables each have Fields named Gauge and Volume. I do not know the proper
procedures for referencing tables in a function, especially with variable
table names.