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

Problems with Fields in queries

Status
Not open for further replies.

christopher007

Instructor
Nov 14, 2003
29
0
0
GB
I have a simple select query that has no criteria, therefore shows all records, I want to use the left function to strip out the first letter of a field called “Full Name” which is the primary key of the table, however if I write Prefix: Left([Full Name],1) I get this error “The specified field ‘[Full Name]’ could not refer to more than one table listed in the FROM clause of you SQL statement."

This only happens with this “Full Name” field if I change the query to use a different field instead of “Full Name” this doesn’t happen.

Any Ideas ?

Thanks in Advance Chris.


 
This usually means you have more than one field with the name [Full Name] in the query coming from different tables.

Prefixing the name with the table would probably help.

[tt]Left(tblTableName.[Full Name],1)[/tt]

- remember [brackets] also on the table name if it contains spaces, special characters...

HTH Roy-Vidar
 
Roy, absolutely right, have got Full Name in another table in the query, now working properly.

Thanks a million
Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top