Need Value from Table based on Query Results

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bruce24444
    New Member
    • Mar 2007
    • 20

    Need Value from Table based on Query Results

    Working on a database to calculate the value of a home.

    User inputs criteria, which is calculated in a query to produce a base factor.
    With this base factor I need to apply a predetermined “Multiplier” from a table which I have created. This multiplier is based on (2) of the previous determined values.

    I’ve been trying Dlookup with many different configurations, but just can’t to seem to get it to return a value.

    This is my latest try:

    Code:
    Multiplier: DLookup ([tbl:ShapeMultiplier]![Multiplier], [tbl:ShapeMultiplier], [que:Main]![Shape] = [tbl:ShapeMultiplier]![Shape] And [que:Main]![Total Sq Footage] = [tbl:ShapeMultiplier]![Square Feet])
    tbl:ShapeMultip lier

    que:Main

    Any suggestions as to what I might have to change to get this to work????
  • sierra7
    Recognized Expert Contributor
    • Sep 2007
    • 446

    #2
    Hi
    Try

    Code:
    Multiplier = DLookup("[Multiplier]", "ShapeMultiplier", "[Shape]=" & [que:Main]![Shape] & " and [Square Feet]= " & [que:Main]![Total Sq Footage] )

    I don't like the [que:Main]! bit and if these 'previuoslty calculayed value could be put into variables lngShape and lngSqFeet then this would be better

    Code:
    Multiplier = DLookup("[Multiplier]", "ShapeMultiplier", "[Shape]=" & lngShape & " and [Square Feet]=" & lngSqFeet )
    I hope this helps but rushed at present

    S7

    Comment

    Working...