rs is the recordset object variable.
No, the VBA code is supposed to update record without use of a query object.
However, I have figured out how to do this with a single SQL statement and eliminate recordset.
In a query object:
UPDATE tblMastertube, (SELECT Heats, C FROM [tblHeatsmaster] WHERE Heat=[enter Heats value]) AS Q
SET tblMastertube.Heat = [Q].[Heats], tblMasterbtube.C = [Q].C
WHERE (((tblMastertube.Heat)=[enter Heat value]));
[enter Heats value] and [enter Heat value] will trigger pop input prompts. These can be replaced with references to controls on form for selection of Heats and Heat values.
In VBA this would be like:
Code:
CurrentDb.Execute "UPDATE tblMastertube, (SELECT Heats, C FROM [tblHeatsmaster] WHERE Heats='" & Me.cbxHeats & "') AS Q " & _
"SET tblMastertube.Heat = [Q].[Heats], tblMastertube.C = [Q].C " & _
"WHERE tblMastertube.Heat='" & Me.cbxHeat & "'";