Returns the value for the specified column in the row uniquely identified by the table’s primary key. A value must be supplied for each column in the primary key.
This function can be added to your worksheet by using the Function Wizard.
Syntax
DBLookup( Connection , table , column , [ key 1 ] , [ ...key n ] )
The DBLookup function syntax has these parts:
Value | Description |
---|---|
connection | Required. This argument identifies the connection name used to connect to the database. |
table name | Required. This argument identifies an SQL statement or a specific internal table name in the Timberline Office database. If this argument does not supply a valid source of data, then the result of the function will be #TABLE? ("table name" not found). |
column | Required. This argument identifies an internal field name or alias returned by the table name argument. If this argument does not contain a valid field name, then the result of the function will be #FIELD? ("field name" not found). |
key 1 , [ ...key n ] | Required. This is a comma-delimited list of values used to identify the primary keys for the row. |
DBLookup Example
Returns the vendor name found based on the vendor key specified in cell A5.
=DBLookup("Sage 100 Contractor", "actpay", "vndnme", $A5)
Remarks
If the function does not return a value, Excel may interpret that to be a zero or a date depending on the cell format.