K
Kimberly
Here's the code for which I keep getting the above error.
I'm trying to add records to a table using VB in Access.
Any help that you can provide is much appreciated.
Public Sub cmdequipment_Click()
Dim dbMyDB As Database
Set dbMyDB = OpenDatabase
("Palletizer/Palletizing_Cost_Tracking.mdb")
Dim rsMyRS As New Recordset
Set rsMyRS = dbMyDB.OpenRecordSet
("tbl_equipmentparts_list", dbOpenDynaset)
rsMyRS.AddNew
rsMyRS!Date = Me.txtdate.Value
rsMyRS!Item_Descrip = Me.txtitemdesc.Value
rsMyRS!Item_Qty = Me.txtitemqty.Value
rsMyRS!Item_Unit_Cost = Me.txtitemcost.Value
rsMyRS!Payment_Frm_Id = Me.cbopayment.Value
rsMyRS!Purchase_Order_Num = Me.txtpo.Value
rsMyRS.Update
End Sub
I'm trying to add records to a table using VB in Access.
Any help that you can provide is much appreciated.
Public Sub cmdequipment_Click()
Dim dbMyDB As Database
Set dbMyDB = OpenDatabase
("Palletizer/Palletizing_Cost_Tracking.mdb")
Dim rsMyRS As New Recordset
Set rsMyRS = dbMyDB.OpenRecordSet
("tbl_equipmentparts_list", dbOpenDynaset)
rsMyRS.AddNew
rsMyRS!Date = Me.txtdate.Value
rsMyRS!Item_Descrip = Me.txtitemdesc.Value
rsMyRS!Item_Qty = Me.txtitemqty.Value
rsMyRS!Item_Unit_Cost = Me.txtitemcost.Value
rsMyRS!Payment_Frm_Id = Me.cbopayment.Value
rsMyRS!Purchase_Order_Num = Me.txtpo.Value
rsMyRS.Update
End Sub