Access 97 Query Field Name Truncation

  • Thread starter Thread starter Kevin Seerup
  • Start date Start date
K

Kevin Seerup

I am having a problem that only occurs on one PC.

On this PC, when one of the queries is run it complains
about a duplicate field name. In the query design the
field name is truncated but appears fine in the SQL View.

The query runs fine on other PCs. I have tried
reinstalling Access but to no avail. Each PC is running
Access 97 SP2.

Regards
Kevin Seerup
 
1. Does the Query include 2 or more Tables and these
Tables have Fields with same name? In this case, check
expressions you use in the Query and you may have use the
Field without the Table qualifier.

2. (I haven't got A97 to check)
IIRC, names can be up to 64 characters long but Access
(and / or JET 3.5) only distinguish only the first 45(?)
characters. The effect is that if you have 2 fields with
different names but the first 45(?) characters are the
same, Access (JET) will consider the 2 Fields to have the
same name.

HTH
Van T. Dinh
MVP (Access)
 
Sounds like there are either some strange characters in the field name, or
else the database is partially corrupt.

Try this sequence:
1. Copy the SQL statement from SQL View, and paste into Notepad.
Visually check the text to make sure the statement is correct.

2. Delete the query.

3. Compact the database to get rid of it completely.

4. Create a new query.

5. Paste in the SQL statement from Notepad.

6. Save the query with the old name.
 
I don't believe there is a problem with the query as it
runs fine on other PCs - the database is on the LAN. When
viewing the SQL, even on the PC causing the error, the
field name is correct, but when I switch back to the Query
Designer mode the field name in the table in the top pane
shows as truncated, and running the query gives the error.

I have also tried copying the database to the local C
drive and compacting it but I still get the same error. I
also created a fresh query using the same SQL statement
and got the same error.

The PC was only recently installed with a fresh copy of
Access and I have also tried reinstalling Access.
 
Back
Top