Multiple phone numbers (home, business, mobile) in one list

  • Thread starter Thread starter Russ via AccessMonster.com
  • Start date Start date
R

Russ via AccessMonster.com

Need help trying to figure out how to make a 2 field query showing multiple
phone numbers (home, business, mobile) with the contact ID in the second
field
Example
home# , Contact ID 3
Mobile# , Contact ID 3
Fax# , Contact ID 3
Any ideas?
 
Can anyone help? I need a two list query one being the phone numbers
(different fields, like home, buisness and mobile) and the other the contact
ID
 
Jeff, thanks!
Are you saying that I did the table wrong by having each phone in it's own
field?
Should there be a details table, is that what you are saying?
Just trying to understand...

Jeff said:
Russ

As a work-around, consider using a UNION query, built up from three queries.
One gets ID & HomePhone, one gets ID & OfficePhone, and the third gets ID &
MobilePhone.

I say this is a work-around because you could get all three in a single
query if your table structure was something like:

tblWhatever
WhateverID
PhoneNumber
PhoneType (i.e., home, office, mobile, toll-free, TTY, etc.)

Regards

Jeff Boyce
Jeff,
I have a contact table, with the following fields, Contact ID, Home Phone,
[quoted text clipped - 23 lines]
 
Ok, just figured out I have no idea how to make a union query, can you help
get me started?

Jeff said:
Russ

As a work-around, consider using a UNION query, built up from three queries.
One gets ID & HomePhone, one gets ID & OfficePhone, and the third gets ID &
MobilePhone.

I say this is a work-around because you could get all three in a single
query if your table structure was something like:

tblWhatever
WhateverID
PhoneNumber
PhoneType (i.e., home, office, mobile, toll-free, TTY, etc.)

Regards

Jeff Boyce
Jeff,
I have a contact table, with the following fields, Contact ID, Home Phone,
[quoted text clipped - 23 lines]
 
Jeff,

Wow, now that is cool! Worked great...
Thanks, this was a great learning experience!


Jeff said:
Russ

Check Access HELP for more details.

Generically, create three queries (one for each field - see my earlier
post).

Then use the SQL from each and start a new query without any tables (select
the SQL view in design mode). Put each of your three query's SQL into the
new one, separated by UNION. For example (your syntax may vary):

SELECT a, x
FROM YourTable
UNION
SELECT a, y
FROM YourTable
UNION
SELEZCT a, z
FROM YourTable;

Regards

Jeff Boyce
Ok, just figured out I have no idea how to make a union query, can you
help
[quoted text clipped - 27 lines]
 
Back
Top