Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query that changes the name of a field - for report purposes

Status
Not open for further replies.

taylornow

Technical User
Oct 16, 2000
90
US
Hello everyone- I have a database for a conference. The classes are referred to like this : F1,R1,L1,etc. Each letter runs up to 6 (F1,F2,F3 and on like that). Easy enough but now with the confirmation letters, they want the name of the class to show - not just the letter/number. Isn't there a way to query and change the letter/number field into the class name? Query into a new table? Somewhere in my brain tells me I can, but right now- it is real dark in there. Any help would be greatly appreciated.

Thanks in advance
Taylor
 
Hi Taylor,

I am somewhat new at this, but my approach would be to add a table with the primary key the letter/number (F1, F2 etc) and a description field for a complete name. The two files would be linked by that unique letter number combination. You would have to build a record for each letter/number combination you use and put in the appropriate description you wish printed on your letter.

Hope this helps,

Jim





 
Taylor,
Make a second table with two columns that are like this:
Abrv Classname

A1 Math
A2 English
A3 Social Studies
. .
. .
. .
Z6 Anthropology

Then create a query with an inner join on the two code fields:
Select <firsttable>.*,<secondtable>.<classname> from <firsttable> inner join <secondtable> on <firsttable>.<abrv> = <secondtable>.<abrv>;

You could just key this into the SQL view of a new query, substituting your table names and field names for the ones in <> (assuming your db is Access).

This question would have probably been a better fit in the Access Queries and JET SQL forum.

Good Luck,
Paul
 
Thanks a bunch. I am going to give it a go this am. Isn't this the Access Queries and Jet SQL forum? If I am not - I apologize.

thanks again - Taylor
 
You're right, Taylor. I do several of these forums and thought I was in the VB one. My mistake. Fifty lashes form me with a wet ethernet cable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top