guys, i have a form with txtboxes on it and on the click of a button, i'm trying to get values from the txtboxes to post to a new table.. The table is called dunptable(which has 3 fields namely productid, productname and cost) and the txtboxes on the form (called sell) are text4, prod and sale.. The code i have is:
Dim solditems As Recordset
Dim newbob As Database
Set solditems = newbob.OpenRecordset("dumptable"
solditems.AddNew
solditems(ProductId) = Forms![frmsellitem]!Text4
solditems(ProductName) = Forms![frmsellitem]!prod
solditems(Price) = Forms![frmsellitem]!Sale
solditems.Update
When i click the button, this comes up "User defined type not defined" and the newbob as datbase is highlighted:-( .. what am i doing wrong? Any info will be so appreciated..Thankssssssss
Dim solditems As Recordset
Dim newbob As Database
Set solditems = newbob.OpenRecordset("dumptable"
solditems.AddNew
solditems(ProductId) = Forms![frmsellitem]!Text4
solditems(ProductName) = Forms![frmsellitem]!prod
solditems(Price) = Forms![frmsellitem]!Sale
solditems.Update
When i click the button, this comes up "User defined type not defined" and the newbob as datbase is highlighted:-( .. what am i doing wrong? Any info will be so appreciated..Thankssssssss