473,406 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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:

Expand|Select|Wrap|Line Numbers
  1. Multiplier: DLookup ([tbl:ShapeMultiplier]![Multiplier], [tbl:ShapeMultiplier], [que:Main]![Shape] = [tbl:ShapeMultiplier]![Shape] And [que:Main]![Total Sq Footage] = [tbl:ShapeMultiplier]![Square Feet]) 
  2.  
tbl:ShapeMultiplier

que:Main

Any suggestions as to what I might have to change to get this to work????
Feb 23 '08 #1
1 1299
sierra7
446 Expert 256MB
Hi
Try

Expand|Select|Wrap|Line Numbers
  1. Multiplier = DLookup("[Multiplier]", "ShapeMultiplier", "[Shape]=" & [que:Main]![Shape] & " and [Square Feet]= " & [que:Main]![Total Sq Footage] ) 
  2.  

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

Expand|Select|Wrap|Line Numbers
  1. Multiplier = DLookup("[Multiplier]", "ShapeMultiplier", "[Shape]=" & lngShape & " and [Square Feet]=" & lngSqFeet ) 
  2.  
I hope this helps but rushed at present

S7
Feb 23 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Shufen | last post by:
Hi, I'm a newbie that just started to learn python, html and etc. I have some questions to ask and hope that someone can help me on. I'm trying to code a python script (with HTML) to get...
9
by: netpurpose | last post by:
I need to extract data from this table to find the lowest prices of each product as of today. The product will be listed/grouped by the name only, discarding the product code - I use...
3
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems...
1
by: Robert | last post by:
I am trying to create a db for service providers by county. I'm relatively new to db programming, but I have done quite a bit of programming ranging from the old basic days up to doing some...
6
by: jjturon | last post by:
Can anyone help me?? I am trying to pass a Select Query variable to a table using Dlookup and return the value to same select query but to another field. Ex. SalesManID ...
0
by: Chuck36963 | last post by:
Hi all, I've been working on a listing problem and I can't figure out how to work it out. I have looked far and wide on the web to find answers, but I'd like other peoples input on my project in...
3
by: Chris | last post by:
Is it possiable to have a iif function in a query where it looks at the next record. for example if I run the query which lists years and if the results in record 2 equals the result in record 1...
9
by: pic078 via AccessMonster.com | last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files) that remains stuck in task manager after exiting the application - you can't reopen database after exiting as a result...
7
by: Rnykster | last post by:
I know a little about Access and have made several single table databases. Been struggling for about a month to do a multiple table database with no success. Help! There are two tables. First...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.