Run Time error 3079


G

Guest

I have a database which uses ADO to access queries to open data. The code has
worked OK for a couple of years. Whilst trying to add a new form I have
encountered the above error. Now all open recordset commands produce this
error. I have checked th KB and checked that I have set error checking to
break on unhandled errors.

Any help would be appreciated
 
Ad

Advertisements

G

Guest

-----Original Message-----
I have a database which uses ADO to access queries to open data. The code has
worked OK for a couple of years. Whilst trying to add a new form I have
encountered the above error. Now all open recordset commands produce this
error. I have checked th KB and checked that I have set error checking to
break on unhandled errors.

Any help would be appreciated
.
 
G

Guest

Hi

Thanks for the response. I am calling a query which specifies the table and
field within the SQL view. These have worked fine up to yesterday and have
not been modified.

Regards
Paul
 
K

Kevin K. Sullivan

This occurs when a field in the table/query *that the crashing query
includes (source table/query)* is added or renamed, even though the crashing
query hasn't been modified.

Your crashing query, qryCrash, obviously has more than one table/query in
its FROM clause. Make sure that all of fields within qryCrash are specified
explicitly: [tblSource1].[Field1] and [qrySource2].[Field1], not just
[Field1]. The qryCrash worked fine with just [Field1] until more than one
source offered that field name.

HTH,

Kevin
 
G

Guest

Hi Kevin

I am not using wild cards as the query does not select every field. This
started when I tried to concatenate 2 filelds (firstName and LastName) into
single field Name as a SQL string rather than calling a query as I wanted to
restrict the recordset to a single row based on the logged on user ID.
Unfortunately evry other query which worked up to this point now returns the
same error even though they have not been changed. All the querys select
fields and do not use wild cards. One particular one even selects from a
single table and still returms the error.

What I want to know is what has introdued this behaviour as I even removing
the code that started it does not reverse the change to the other queries.

Regards
Paul

Kevin K. Sullivan said:
This occurs when a field in the table/query *that the crashing query
includes (source table/query)* is added or renamed, even though the crashing
query hasn't been modified.

Your crashing query, qryCrash, obviously has more than one table/query in
its FROM clause. Make sure that all of fields within qryCrash are specified
explicitly: [tblSource1].[Field1] and [qrySource2].[Field1], not just
[Field1]. The qryCrash worked fine with just [Field1] until more than one
source offered that field name.

HTH,

Kevin

Paul Cram said:
Hi

Thanks for the response. I am calling a query which specifies the table
and
field within the SQL view. These have worked fine up to yesterday and have
not been modified.

Regards
Paul
 
K

Kevin K. Sullivan

Post the SQL of the lowest-level query that has the problem. I'm certain
that it is matched up with another query or table that also has a field
called Name. When you reference [Name] in a query's WHERE clause, ORDER BY,
or JOIN, Access doesn't know which Name field it is referring to. I would
avoid the keyword Name altogether. Try using CustomerName or something more
descriptive.

Wildcards are not involved. The trouble is that each field name referenced
in SQL must be unique to one of the sources or else it must be qualified by
the [source object].[field name]. Use square brackets around any table or
field names that have spaces or illegal characters.

Kevin

Paul Cram said:
Hi Kevin

I am not using wild cards as the query does not select every field. This
started when I tried to concatenate 2 filelds (firstName and LastName)
into
single field Name as a SQL string rather than calling a query as I wanted
to
restrict the recordset to a single row based on the logged on user ID.
Unfortunately evry other query which worked up to this point now returns
the
same error even though they have not been changed. All the querys select
fields and do not use wild cards. One particular one even selects from a
single table and still returms the error.

What I want to know is what has introdued this behaviour as I even
removing
the code that started it does not reverse the change to the other queries.

Regards
Paul

Kevin K. Sullivan said:
This occurs when a field in the table/query *that the crashing query
includes (source table/query)* is added or renamed, even though the
crashing
query hasn't been modified.

Your crashing query, qryCrash, obviously has more than one table/query in
its FROM clause. Make sure that all of fields within qryCrash are
specified
explicitly: [tblSource1].[Field1] and [qrySource2].[Field1], not just
[Field1]. The qryCrash worked fine with just [Field1] until more than
one
source offered that field name.

HTH,

Kevin

Paul Cram said:
Hi

Thanks for the response. I am calling a query which specifies the table
and
field within the SQL view. These have worked fine up to yesterday and
have
not been modified.

Regards
Paul

:

that should be 3079. sorry about that.
-----Original Message-----
I have a database which uses ADO to access queries to
open data. The code has
worked OK for a couple of years. Whilst trying to add a
new form I have
encountered the above error. Now all open recordset
commands produce this
error. I have checked th KB and checked that I have set
error checking to
break on unhandled errors.

Any help would be appreciated
.
 
Ad

Advertisements

G

Guest

Hi Kevin

Here is the SQL from the query that was working and is not now:

SELECT tblQuoteNo.QuoteNo
FROM tblQuoteNo;

In addition the SQL from the query that I was adding is here:

SELECT tblContacts.ContactID, [First Name] & " " & [last name] AS Name
FROM tblContacts
WHERE (((tblContacts.CompanyID)=1642));

Both are qualified by table and in addition tblContacts is the only table
with Fields [First Name] and [Last Name]

Why this should cause a problem seems to be the cause of the error.

Regards
Paul


Kevin K. Sullivan said:
Post the SQL of the lowest-level query that has the problem. I'm certain
that it is matched up with another query or table that also has a field
called Name. When you reference [Name] in a query's WHERE clause, ORDER BY,
or JOIN, Access doesn't know which Name field it is referring to. I would
avoid the keyword Name altogether. Try using CustomerName or something more
descriptive.

Wildcards are not involved. The trouble is that each field name referenced
in SQL must be unique to one of the sources or else it must be qualified by
the [source object].[field name]. Use square brackets around any table or
field names that have spaces or illegal characters.

Kevin

Paul Cram said:
Hi Kevin

I am not using wild cards as the query does not select every field. This
started when I tried to concatenate 2 filelds (firstName and LastName)
into
single field Name as a SQL string rather than calling a query as I wanted
to
restrict the recordset to a single row based on the logged on user ID.
Unfortunately evry other query which worked up to this point now returns
the
same error even though they have not been changed. All the querys select
fields and do not use wild cards. One particular one even selects from a
single table and still returms the error.

What I want to know is what has introdued this behaviour as I even
removing
the code that started it does not reverse the change to the other queries.

Regards
Paul

Kevin K. Sullivan said:
This occurs when a field in the table/query *that the crashing query
includes (source table/query)* is added or renamed, even though the
crashing
query hasn't been modified.

Your crashing query, qryCrash, obviously has more than one table/query in
its FROM clause. Make sure that all of fields within qryCrash are
specified
explicitly: [tblSource1].[Field1] and [qrySource2].[Field1], not just
[Field1]. The qryCrash worked fine with just [Field1] until more than
one
source offered that field name.

HTH,

Kevin

Hi

Thanks for the response. I am calling a query which specifies the table
and
field within the SQL view. These have worked fine up to yesterday and
have
not been modified.

Regards
Paul

:

that should be 3079. sorry about that.
-----Original Message-----
I have a database which uses ADO to access queries to
open data. The code has
worked OK for a couple of years. Whilst trying to add a
new form I have
encountered the above error. Now all open recordset
commands produce this
error. I have checked th KB and checked that I have set
error checking to
break on unhandled errors.

Any help would be appreciated
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Error 3079- 4
SQL question on error 3079 2

Top