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

Is there any way to get 2 columns with the same name

Status
Not open for further replies.

projecttoday

Programmer
Joined
Feb 28, 2004
Messages
208
Location
US
I am doing a transfershpreadsheet from Access to Excel. The field names of
the query become the top row of the spreadsheet when the transfer is
executed. What I need is 2 columns with the exact same name. I have tried
using dummy tables and queries but it always rejects 2 columns with the exact same
name. Anyone know of a way?

Robert
 
Where are these columns coming from?

HarleyQuinn
---------------------------------
You can hang outside in the sun all day tossing a ball around, or you can sit at your computer and do something that matters. - Eric Cartman

Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before posting.

 
Access will not permit the "exact eame names". The ineitable result is " ... duplicate definition ... " which co-incidentally would also mean "exact same data", which begs the question of WHY does the execl sheet (or any other representation) need the duplication?

In terms of a solution, the best you I can suggest is a self join with the The first source alaised as "A", and the second source alaised as "B", then the First copy would be A.[bold]FieldName[/bold] as opposet to the Original, which would appear as B.[bold]FieldName[/bold]



MichaelRed


 
It can come from any table or code. This is for a constant heading. The heading will never change. It is in row 1 of the spreadsheet. Access uses field names for row 1.

User wants 2 weeks on a spreadsheet. Currently I have sun, mon, tue, wed, thur, fri, sat, sun_, mon_, tue_, wed_, thur_, fri_, sat_. Not a huge deal but it would be nice to get rid of those _'s. The next line below contains the actual dates but that's not a problem.

I have already tried using a join. A.sun, A.mon ... B.sun, B.mon is not what I need.
 
I think you asked the same question (or someone with the exact same issue) in the MS Access public news groups and the answer is basically the same. If you want Excel to have two different columns with the same title, you can use Automation.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top