Error Message After Calling Update Query

cheer

Registered User.
Local time
Tomorrow, 07:01
Joined
Oct 30, 2009
Messages
222
Anyone can advise how to correct the error in my attachment
 

Attachments

  • Update Query.jpg
    Update Query.jpg
    95.4 KB · Views: 94
Have you tried the Run Command rather than Open?

It is never easy to understand someones question with just a screen shot....;)
 
Docmd.RunCommand - show error "Type Mismatch"

Can it be anything wrong to the Update Query instead of VBA code?
 
Without seeing your database it isn't easy to check out a response that will work for you.
 
This is new update query screen for better understanding ...
 

Attachments

  • Update Query.jpg
    Update Query.jpg
    94.7 KB · Views: 75
Check this sample out. I am assuming you have both fields of the same type.

SQL Code

UPDATE tblDestination INNER JOIN tblUpdate ON tblDestination.DrawingNumber = tblUpdate.DrawingNumber SET tblDestination.PiecePartUnitPrice = [tblUpdate]![PiecePartUnitPrice];

Attached small sample database for you to look at.
 

Attachments

Master_Drawing_Comparison is not updateable because of one (or more) of the following reasons:

http://allenbrowne.com/ser-61.html

I see Min and Max there so I suspect that it is a query that is GROUPED.

Save directly to the table.
 
oss
Check this sample out. I am assuming you have both fields of the same type.

SQL Code



Attached small sample database for you to look at.

1) Master_Drawing_Comparison is a table
2) V_CustomerOrder_LatestLotNo_PiecePart3 is a query
3) Source : V_CustomerOrder_LatestLotNo and destination : Master_Drawing_Comparison
4) Both original objects (mean table) have same field type for the field PiecePartUnitPrice
5) i) Possible to update a table field from a query ?
ii) Possible to update from a query with grouping to a table ?
6) Direct query execution will prompt error message : Operation must use an updateable query

What could be the best solution now ?
 
Last edited:
ii) Possible to update from a query with grouping to a table ?
I'm sure the link I provided clearly states the reason why your query is not updateable. Plus I gave you a hint as to a possible cause.

Besides, you shouldn't be saving calculated values.
 

Users who are viewing this thread

Back
Top Bottom