Hello everyone!
I'm trying to send results from my from to a table.
Results on the from are from query and some are typed in textboxes. Those from query are in combobox and one is in listbox which is the result from the combobox choice. Here's the code I'm trying to get to work (I've found this on the forum):
Private Sub Command61_Click()
Dim rst As Recordset
Set rst = CurrentDb.OpenRecordset("SELECT * FROM tblexpenses", dbopendynaset)
rst.MoveFirst
rst!eqpmntcode = cboEqpmnt
rst!downtime = downtime
rst!partcost = List0
rst!total = total
rst.Update
rst.Close
End Sub
When I run it, "invalid argument" error appears and lists this row: Set rst = CurrentDb.OpenRecordset("SELECT * FROM tblexpenses", dbopendynaset) error appears. What's wrong?
Thank you!
Marko
I'm trying to send results from my from to a table.
Results on the from are from query and some are typed in textboxes. Those from query are in combobox and one is in listbox which is the result from the combobox choice. Here's the code I'm trying to get to work (I've found this on the forum):
Private Sub Command61_Click()
Dim rst As Recordset
Set rst = CurrentDb.OpenRecordset("SELECT * FROM tblexpenses", dbopendynaset)
rst.MoveFirst
rst!eqpmntcode = cboEqpmnt
rst!downtime = downtime
rst!partcost = List0
rst!total = total
rst.Update
rst.Close
End Sub
When I run it, "invalid argument" error appears and lists this row: Set rst = CurrentDb.OpenRecordset("SELECT * FROM tblexpenses", dbopendynaset) error appears. What's wrong?
Thank you!
Marko