Solved

Adding 2 tables via Query Design

Posted on 2011-09-16
4
264 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 500 total points
ID: 36552411
LTL: Cdbl([getOriginBeyond]![LTL]) + Cdbl([getDestinBeyond]![LTL])

0
 
LVL 92

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now