my Access form will not print preview...something about my SQL

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to preview my form and the message keeps coming up " The
specified field 'PostalCode' could refer to more than one table listed in the
FROM clause of your SQL statement." Now PostalCode shows up in my Customer's
table and the table that it is linked to it callled table 1. The SQL
statement is taking the data from the PostalCode in table1. If I try to
change this to the Customer table it doesn't change anything. As far as I can
tell everything is correctly spelled.
Thanks for you help
Shell
 
Does your SQL statement specifically spell out which table, as in:

SELECT Table1.PostalCode ...

Sprinks
 
Yes it does.... that is exactly what it says.... I have a PostalCode in
table1 and in my Customers table.... The SQL statement takes it from Table1
 
Sure can...
SELECT [Table1].[CustomerID], [Table1].[CompanyName], [Table1].[FirstName],
[Table1].[LastName], [Table1].[BillingAddress], [Table1].[Table2_ID],
[Table2].[City/Town], [Table1].[PostalCode], [Table3].[Province],
[Table1].[PhoneNumber], [Table3].[FaxNumber], [Table1].[Notes]
FROM Table1 LEFT JOIN (Table2 LEFT JOIN Table3 ON
[Table2].[Table3_ID]=[Table3].[ID]) ON [Table1].[Table2_ID]=[Table2].[ID];

hope you can help....
Shell
 
Is your report's record source a saved query or is it the SQL statement? Try
to save it as a query and then try again.

One tip that makes my life much easier is that no two fields in an mdb have
the same name.

--
Duane Hookom
MS Access MVP


Shell said:
Sure can...
SELECT [Table1].[CustomerID], [Table1].[CompanyName],
[Table1].[FirstName],
[Table1].[LastName], [Table1].[BillingAddress], [Table1].[Table2_ID],
[Table2].[City/Town], [Table1].[PostalCode], [Table3].[Province],
[Table1].[PhoneNumber], [Table3].[FaxNumber], [Table1].[Notes]
FROM Table1 LEFT JOIN (Table2 LEFT JOIN Table3 ON
[Table2].[Table3_ID]=[Table3].[ID]) ON [Table1].[Table2_ID]=[Table2].[ID];

hope you can help....
Shell


Duane Hookom said:
Can you provide the SQL view of your form's record source?
 
Back
Top