By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,894 Members | 1,942 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,894 IT Pros & Developers. It's quick & easy.

Run-time error 3079

P: 2
Using Access 2013 I have the following queries:


Expand|Select|Wrap|Line Numbers
  1. SELECT dbo_FieldTrips.TripID AS VoucherNumber, dbo_FieldTrips.DepartureDate AS TripDate, dbo_FieldTrips.Status, dbo_FieldTrips.School AS Requestor, dbo_FieldTrips.Destination, dbo_FieldTrips.TripCategory, dbo_FieldTrips.TeamNumber, dbo_FieldTrips.ActivityTeamNumber
  2. FROM dbo_FieldTrips INNER JOIN qryVouchersNoReport ON dbo_FieldTrips.TripID = qryVouchersNoReport.TripID
  3. ORDER BY dbo_FieldTrips.DepartureDate;


Expand|Select|Wrap|Line Numbers
  1. SELECT dbo_FieldTrips.TripID, CStr([dbo_FieldTrips].[TripID]) AS TripNumber
  2. FROM dbo_FieldTrips
  3. WHERE (((CStr([dbo_FieldTrips].[TripID])) Not In (SELECT dbo_VW_VoucherReport.VoucherNumber FROM dbo_VW_VoucherReport )));
Running the first query directly in Access produces the desired results. However, when I pass that query name in a DoCmd.OpenReport statement, although I fully qualify the DepartureDate field I get this error:

"The specified field dbo_FieldTrips.DepartureDate could refer to more than one table in the FROM clause of your SQL statement."
Mar 6 '17 #1
Share this Question
Share on Google+
2 Replies

P: 5
here the problem is with your field names. Don't use the same field names as outputs from a query & you will not have ambiguous join errors.
Mar 7 '17 #2

P: 2
Thank you for taking the time to reply, but I do not understand. If any field is named the same it is TripID. I aliased that name in one of the queries but got the same result.

Note also that the error message referenced the DepartureDate field, which exists in only one of the tables. Further, the error message itself contains the table name, showing that I did in fact qualify it.
Mar 7 '17 #3

Post your reply

Sign in to post your reply or Sign up for a free account.