Expression in query

G

Guest

I am trying to do an update query with the following..

In Field: Attachments: IIf([dbo_tblProductversion].[Attachments]=True,"Y","N")

Because I want to convert the -1 and 0 to Y or N in a text datatype

I want to update to: [Dev_dbo_tblProduct].[Attachments]

I am getting an invalid name when I try and run the query. This expression
works in an append query to the same table but not in the update query. Yes I
have also tried to select a table, put it in the criteria section etc but
nothing seems to work. Any ideas?
 
G

Guest

It seems that the table dbo_tblProductversion doesn't apear in the query, so
the query as a resault can't find the Attachments field.
In append it works because most likely that the query was based on
dbo_tblProductversion, so the field was found

Can you link the two tables, dbo_tblProductversion and the table you are
trying to update?
 
G

Guest

The query that it worked with (Append) and this query is the exact query.
Just a cut and paste with minor adjustments and no modifications to that
field. This database is strange. Any ideas?

Ofer Cohen said:
It seems that the table dbo_tblProductversion doesn't apear in the query, so
the query as a resault can't find the Attachments field.
In append it works because most likely that the query was based on
dbo_tblProductversion, so the field was found

Can you link the two tables, dbo_tblProductversion and the table you are
trying to update?

--
Good Luck
BS"D


troy said:
I am trying to do an update query with the following..

In Field: Attachments: IIf([dbo_tblProductversion].[Attachments]=True,"Y","N")

Because I want to convert the -1 and 0 to Y or N in a text datatype

I want to update to: [Dev_dbo_tblProduct].[Attachments]

I am getting an invalid name when I try and run the query. This expression
works in an append query to the same table but not in the update query. Yes I
have also tried to select a table, put it in the criteria section etc but
nothing seems to work. Any ideas?
 

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

Top