Nz function compilation error

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

Guest

My query looks like this:
SELECT Diptera.ID, NZ([Species],[Subgenus]) AS Name INTO [synonym]
FROM Diptera;
I get a compile error.
What sould I do?
DAO 3.6 Object Library is ok. The query worked 2 days ago
 
The message is: Compile error in query clause Nz([Species], [Subgenus])
(freely translated to English)
--
Thank you.


James skrev:
Works for me, what exactly is the error message?

James

My query looks like this:
SELECT Diptera.ID, NZ([Species],[Subgenus]) AS Name INTO [synonym]
FROM Diptera;
I get a compile error.
What sould I do?
DAO 3.6 Object Library is ok. The query worked 2 days ago
 
Hi,

I would start by removing reserved words in access...like

"Name" rename this to something else.
SELECT Diptera.ID, NZ([Species],[Subgenus]) AS Name INTO [synonym]
Arts wrote:
My query looks like this:
SELECT Diptera.ID, NZ([Species],[Subgenus]) AS Name INTO [synonym]
FROM Diptera;
I get a compile error.
What sould I do?
DAO 3.6 Object Library is ok. The query worked 2 days ago
 
Sorry, the query does not include "Name", this is only a translation into
English. The word I am using is "Art"
--
Thank you.


AccessVandal via AccessMonster.com skrev:
Hi,

I would start by removing reserved words in access...like

"Name" rename this to something else.
SELECT Diptera.ID, NZ([Species],[Subgenus]) AS Name INTO [synonym]
Arts wrote:
My query looks like this:
SELECT Diptera.ID, NZ([Species],[Subgenus]) AS Name INTO [synonym]
FROM Diptera;
I get a compile error.
What sould I do?
DAO 3.6 Object Library is ok. The query worked 2 days ago
 
Are you still using it from within Access? or from somewhere else?


Have you tried to replace Nz(a, b) by iif( a is null, b, a) ?



Vanderghast, Access MVP
 
I am using it from within Access.
I have tried iif( a is null, b, a) and that works ok.
--
Thank you.


Michel Walsh skrev:
Are you still using it from within Access? or from somewhere else?


Have you tried to replace Nz(a, b) by iif( a is null, b, a) ?



Vanderghast, Access MVP


Arts said:
My query looks like this:
SELECT Diptera.ID, NZ([Species],[Subgenus]) AS Name INTO [synonym]
FROM Diptera;
I get a compile error.
What sould I do?
DAO 3.6 Object Library is ok. The query worked 2 days ago
 
Back
Top