• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 522
  • Last Modified:

add a column in access from an expression

Hi, I am trying to create a table and add a column which results from concatenating 2 exisiting columns, much like how you can do it in Excel, but am having a great difficulty doing it.
Ultimately, I would like to make this automatic, so every time I open this table, this column gets recalculated.    How should I approach this?  
0
yballan
Asked:
yballan
2 Solutions
 
Patrick MatthewsCommented:
>>How should I approach this?

You should it approach it by NOT putting that into your table.

Storing derived data is almost always a bad idea.  Instead, you should calculate stuff like that on demand in your queries, reports, and forms.
0
 
kmslogicCommented:
You can't create calculated columns in Access in the table itself as matthew said.  What you want to do is create a Query based on the table and then put your calculated field there and then base future queries/ forms/ reports off of that query instead of off the table itself.

In your query, for example if Col1 and Col2 are numbers you could have:

Col3: [Col1] + [Col2]

it's as simple as that.
0
 
yballanAuthor Commented:
Thank you, both, that makes a lot of sense.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now