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  

How to redisplay the text field based on a stored ID field



 
 
Thread Tools Display Modes
  #1  
Old February 19th, 2010, 04:43 PM posted to microsoft.public.access.queries
Billiam
external usenet poster
 
Posts: 174
Default How to redisplay the text field based on a stored ID field

I stored the ID of a lookup table for Salutation as a foreign key in my
People table. I did the same thing with a suffix lookup table.

I am trying to produce a concatenated Salutation Firstname MidName Lastname
Suffix based on my people table, however, it will only show the stored ID
Number.

Could someone show me the proper way to query this. I have setup
relationships from the Suffix and Salutation tables to the foreign keys in
the People table, and I was able to get the salutation to display as
text...when I look at the sql view, it seems to me that my problem is that
the query is only doing an innerjoin on the salutation ID...as soon as I add
in the suffix table, I end up with an empty query.

Thank you for any help...I have always been unsure how to reconvert the ID
to the text.

Billiam

  #2  
Old February 19th, 2010, 05:18 PM posted to microsoft.public.access.queries
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default How to redisplay the text field based on a stored ID field

Billiam -

You probably need an outer join with the suffix table unless everyone is
required to have a suffix. If you post your SQL, that will allow us to help
you better.

--
Daryl S


"Billiam" wrote:

I stored the ID of a lookup table for Salutation as a foreign key in my
People table. I did the same thing with a suffix lookup table.

I am trying to produce a concatenated Salutation Firstname MidName Lastname
Suffix based on my people table, however, it will only show the stored ID
Number.

Could someone show me the proper way to query this. I have setup
relationships from the Suffix and Salutation tables to the foreign keys in
the People table, and I was able to get the salutation to display as
text...when I look at the sql view, it seems to me that my problem is that
the query is only doing an innerjoin on the salutation ID...as soon as I add
in the suffix table, I end up with an empty query.

Thank you for any help...I have always been unsure how to reconvert the ID
to the text.

Billiam

  #3  
Old February 19th, 2010, 05:44 PM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default How to redisplay the text field based on a stored ID field

On Fri, 19 Feb 2010 08:43:01 -0800, Billiam
wrote:

I stored the ID of a lookup table for Salutation as a foreign key in my
People table. I did the same thing with a suffix lookup table.

I am trying to produce a concatenated Salutation Firstname MidName Lastname
Suffix based on my people table, however, it will only show the stored ID
Number.

Could someone show me the proper way to query this. I have setup
relationships from the Suffix and Salutation tables to the foreign keys in
the People table, and I was able to get the salutation to display as
text...when I look at the sql view, it seems to me that my problem is that
the query is only doing an innerjoin on the salutation ID...as soon as I add
in the suffix table, I end up with an empty query.

Thank you for any help...I have always been unsure how to reconvert the ID
to the text.

Billiam


Please post the complete SQL of the query. I think you need to join both the
salutation and suffix tables to the People table using "Left Outer Join" -
select the join line in the query design window and choose the option "show
all records in People and matching records in...". You would then choose the
text field from the lookup table (rather than the ID from the people table).
--

John W. Vinson [MVP]
 




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 04:40 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.