G
Guest
I have a form (test form) that has 2 subforms on it(test form - prod form)
with many unbound controls that are doing calculations. On one of the sub
forms I need to write data from the unbound control (that is doing a
calculation) to a table called (prod table)
This code is used by a button - on click-Here is the code I have -
Dim db As Database
Dim rs As DAO.Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("prod table")
rs.AddNew
rs!FormulationCost = Forms!prod form!FormulationCost
rs.Update
rs.Close
I get a run-time error 2450 - Can not find the form Prod Form in the macro
or vb.
Do you have to add something if you are using a sub form (prod form being
the sub form on my test form?
Many thanks in advance.
Curt
with many unbound controls that are doing calculations. On one of the sub
forms I need to write data from the unbound control (that is doing a
calculation) to a table called (prod table)
This code is used by a button - on click-Here is the code I have -
Dim db As Database
Dim rs As DAO.Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("prod table")
rs.AddNew
rs!FormulationCost = Forms!prod form!FormulationCost
rs.Update
rs.Close
I get a run-time error 2450 - Can not find the form Prod Form in the macro
or vb.
Do you have to add something if you are using a sub form (prod form being
the sub form on my test form?
Many thanks in advance.
Curt