Concatenate two fields in query!

  • Thread starter Niklas Östergren
  • Start date
N

Niklas Östergren

Hi!
This one is probably simple and I´ll probably feel kind of stupid when I see
the answer.
I have an application for members in a asossiation. In this application we
have regular information like names, addresses etc.

When a person apply for a membership in this assosiation I first store the
membership entry in table < tblNewMemberShipEntry >.

When the user want to registrate a new membership to a person who isn´t
allready registrated as a member I copy some of the fields from this table
to the main table < tblPerson >.

Some of the data I copy is [FirstName], [LastName], [DoB] etc. etc. But we
also have some data which I don´t copy. Like information about how the
person came in contact with the assosiation, interests and so on. And
offcource [MemberShipApplyDate].

Now to my Q:

- Some of the users which entry new memberships don´t know all the members
by name and it might therfore be impossible for them to know in which form
(with each recordsource) they shall search for the person who have payed the
membership fee. So I want to create a query in which I concatenate both
tabels. Well at least the fields I need in the form which I´m about to
create just for this purpose (to add new memberships).

With new memberships I mean both new memberships for old members and for new
members. A membership isn´t valid until the person have payed the membership
fee.

I have tryed some solutions and know what I can do, but I don´t like the
idéa of saving all the data in one table, which would be one way of solving
this. Maby even the best way, I don´t know!?

Here´s the table names and some of the fields I´d like to concatenate:

< tblNewMemberShipEntry > < tblPerson >
[PersonID]
[NewMemberShipEntryID] [fkNewMemberShipEntryID]
[FirstName] [FirstName]
[LastName] [LastName]
[DoB] [DoB]

Any idéa of how I shall accomplishe this?

TIA!
// Niklas
 
D

Douglas J. Steele

Sounds as though you want a Union query. You must create these in the SQL
View, something like:

SELECT 0 AS PersonID, NewMemberShipEntryID, FirstName, LastName, DOB
FROM tblNewMemberShipEntry
UNION
SELECT PersonID, fkNewMemberShipEntryID, FirstName, LastName, DoB
FROM tblPerson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top