Also, declarations (Dim m_last_addt_cost As Variant) should NOT be inside a loop structure.
Code:
Dim d As DAO.Database
Dim r As DAO.Recordset
Dim m_vin as String
Dim m_cost As Double
Dim m_last_addt_cost As Variant '<<--maybe should be Double???
Set d = CurrentDb()
Set r = d.OpenRecordset("overhauling_history_temp_1")
While Not r.EOF
m_vin = r.Fields("vin")
m_cost = r.Fields("original_amount")
m_last_addt_cost = DLookup("additional_costs", "inventory_temp_1", "vin = '" & m_vin & "'")
CurrentDb.Execute "UPDATE inventory_temp_1 SET additional_costs = " & m_cost & " where inventory_temp_1.vin = '" & m_vin & "'"
CurrentDb.Execute "INSERT INTO justtest(vin,cost,last_cost) VALUES('" & m_vin & "', " & m_cost & ", " & m_last_addt_cost & ")"
r.MoveNext
Wend
r.Close
Set r = Nothing
Set d = Nothing