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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Can I add data from 3 fields together to form a new field



 
 
Thread Tools Display Modes
  #1  
Old July 7th, 2009, 12:08 PM posted to microsoft.public.access
Jack Grossman
external usenet poster
 
Posts: 1
Default Can I add data from 3 fields together to form a new field

Can I add data from 3 fields together to form a new field
  #2  
Old July 7th, 2009, 12:12 PM posted to microsoft.public.access
BruceM[_4_]
external usenet poster
 
Posts: 558
Default Can I add data from 3 fields together to form a new field

You can concatenate the values for display purposes. For instance:

[City] & ", " & [State] & " " & [PostalCode]

If you mean something else, please provide details.

"Jack Grossman" Jack wrote in message
...
Can I add data from 3 fields together to form a new field



  #3  
Old July 7th, 2009, 12:21 PM posted to microsoft.public.access
Kc-Mass
external usenet poster
 
Posts: 362
Default Can I add data from 3 fields together to form a new field

The answer is "yes". You would only want to do this in a query you would not
want to do this
in a table as that is redundent and will quickly introduce data errors.

So you have text fields of FirstName, MiddleName and LastName. To add them
together ( really
concatenate them) as follows: txtFullName = FirstName & " " & MiddleName
& " " & LastName.

Or if you have numeric fields of BasePrice, DiscountRate, Sales Tax. To
add them together
try txtCost = BasePrice - (DiscountRate * BasePrice) + Sales Tax

Regards

Kevin


"Jack Grossman" Jack wrote in message
...
Can I add data from 3 fields together to form a new field



  #4  
Old July 7th, 2009, 12:36 PM posted to microsoft.public.access
BruceM[_4_]
external usenet poster
 
Posts: 558
Default Can I add data from 3 fields together to form a new field

To clarify a little, in an unbound text box you could have as the Control
Source:
= FirstName & " " & MiddleName & " " & LastName

In a query:
txtFullName: FirstName & " " & MiddleName & " " & LastName

That is, no = sign in the query.

"kc-mass" connearney_AT_comcast_DOT_net wrote in message
...
The answer is "yes". You would only want to do this in a query you would
not want to do this
in a table as that is redundent and will quickly introduce data errors.

So you have text fields of FirstName, MiddleName and LastName. To add
them together ( really
concatenate them) as follows: txtFullName = FirstName & " " & MiddleName
& " " & LastName.

Or if you have numeric fields of BasePrice, DiscountRate, Sales Tax. To
add them together
try txtCost = BasePrice - (DiscountRate * BasePrice) + Sales Tax

Regards

Kevin


"Jack Grossman" Jack wrote in message
...
Can I add data from 3 fields together to form a new field





 




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 01:33 PM.


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