Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Adding 2 tables via Query Design

Posted on 2011-09-16
4
Medium Priority
?
319 Views
Last Modified: 2012-05-12
Hi there,

I am trying to add 2 tables via a query design.

The calculation in expression builder is this

LTL: [getOriginBeyond]![LTL] + [getDestinBeyond]![LTL]

Open in new window


The values on each of the above LTL sides is
16.1 and 14.36

The result I am getting in the results table is "16.114.36"

Hence this is being treated as a text addition

Since 'getOriginBeyond' data is being derived from another tabled called "ZONES", I went there and tried to change the 'Data Type' but it wouldn't let me change the data type :/

Any quick fixes to this?

Thanks!


0
Comment
Question by:Shanan212
  • 2
4 Comments
 
LVL 10

Accepted Solution

by:
Michael Vasilevsky earned 2000 total points
ID: 36552411
LTL: Cdbl([getOriginBeyond]![LTL]) + Cdbl([getDestinBeyond]![LTL])

0
 
LVL 93

Expert Comment

by:Patrick Matthews
ID: 36552412
If those are both currently text:

LTL: Val([getOriginBeyond]![LTL]) + Val([getDestinBeyond]![LTL])

Open in new window


0
 
LVL 10

Expert Comment

by:Michael Vasilevsky
ID: 36552414
Cdbl() converts the data in your field to the double (number) data type and they should add as expected then
0
 
LVL 13

Author Closing Comment

by:Shanan212
ID: 36552423
wow! Nice! Thank you and have a great weekend!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question