Update query gives odd message

D

David

I've written my first ever update query but when I try to
run it, it says 'operation must use an updatable query'. I
do not know what this means. Here is the query:

Update ChangeRequest
Set RequestType = (Select RequestTypeID from
RequestTypeConv where RequestTypeCode =
ChangeRequest.RequestTypeID);
 
D

Duane Hookom

Try:
Update ChangeRequest
Set RequestType = DLookup("RequestTypeID", "RequestTypeConv",
"RequestTypeCode =" & RequestTypeID);
The above assumes a numeric field of RequestTypeCode. If it is text, try:
Set RequestType = DLookup("RequestTypeID", "RequestTypeConv",
"RequestTypeCode =""" & RequestTypeID & """");
 

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