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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

alias field names

Status
Not open for further replies.

cheyenne2002

Instructor
Jul 26, 2005
229
US
Not sure if this is possible but I thought I would ask.

I want to use one of the Microsoft template databases (Events), but I need to link my existing table to it. The existing table does not have the same field names as the template. I can NOT change my existing table names and every time I try to change the ones in the template all I get is a mess.

Is there a way to tell the template when it is looking for [field1]in the template that it is called [xxx] in the existing table.

I hope I have explained it correctly.

Sharon
 
Hello:

I believe this may work for you: Make a query based on your table that you do not want the field names to change.

Run the query to see if it is correct, then open the query in design mode and from the menu, select VIEW, Properties.
In the CAPTION text box you can put a custom name for each field in your query. Then when the query is run, your caption will show as the heading. This does not alter any field names in your existing table. It is an alias.

Good Luck with this
Mark
 
When you say "... link my existing table to it ..." do you mean JOIN it to an existing table?

If so, the JOIN conditions function automatically based on the same field names (provided they also have the same data types). You can also create a join in query design view by clicking and dragging a field in one table to the corresponding field in another.

If you are using SQL view they you can specify them as
Code:
Select ...

From tblA A INNER JOIN tblB B
     ON A.[red]ThisField[/red] = B.[red]ThatField[/red]
 
Golom,

Where do I type in this code. Is there a place I can do it only once and when ever it see ThisField it will interpret it to mean ThatField?

Also is Table A here the imported table or the one that came with the template??

I'm at the point where I really need to get this database done because people are starting to register for our conference.

I'm a newbie at this so I hope it is not too difficult.

Thanks for all your help. You guys are really great.
Sharon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top