A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Suming numbers and text together



 
 
Thread Tools Display Modes
  #1  
Old July 15th, 2008, 06:19 PM posted to microsoft.public.access.queries
Adam
external usenet poster
 
Posts: 545
Default Suming numbers and text together



I have a problem. I have a table with a text field that was set up wrong
from the start.

The table looks like this.

Feild1
________
1
2
1
2
2 reserved
4 Res
2
1
3 res

I would like to sum the numbers but the text kills it. Is their a way to
have the query see only the numbers only?

Please Help..

Adam



  #2  
Old July 15th, 2008, 07:01 PM posted to microsoft.public.access.queries
fredg
external usenet poster
 
Posts: 4,386
Default Suming numbers and text together

On Tue, 15 Jul 2008 10:19:03 -0700, Adam wrote:

I have a problem. I have a table with a text field that was set up wrong
from the start.

The table looks like this.

Feild1
________
1
2
1
2
2 reserved
4 Res
2
1
3 res

I would like to sum the numbers but the text kills it. Is their a way to
have the query see only the numbers only?

Please Help..

Adam


Sum(Val([FieldName])) = 18 using the above data.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #3  
Old July 15th, 2008, 07:03 PM posted to microsoft.public.access.queries
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Suming numbers and text together

Adam wrote:
I have a problem. I have a table with a text field that was set up wrong
from the start.

The table looks like this.

Feild1
________
1
2
1
2
2 reserved
4 Res
2
1
3 res

I would like to sum the numbers but the text kills it. Is their a way to
have the query see only the numbers only?



Try using the Val function:

Total: Sum(Val(field1))

--
Marsh
MVP [MS Access]
  #4  
Old July 16th, 2008, 01:33 PM posted to microsoft.public.access.queries
Adam
external usenet poster
 
Posts: 545
Default Suming numbers and text together



"Marshall Barton" wrote:

Adam wrote:
I have a problem. I have a table with a text field that was set up wrong
from the start.

The table looks like this.

Feild1
________
1
2
1
2
2 reserved
4 Res
2
1
3 res

I would like to sum the numbers but the text kills it. Is their a way to
have the query see only the numbers only?



Try using the Val function:

Total: Sum(Val(field1))

--
Marsh
MVP [MS Access]



Thanks that worked...

Adam

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:36 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.