Object Variable or With block variable not set

Scythed

Registered User.
Local time
Today, 04:41
Joined
Aug 30, 2008
Messages
28
Can anyone please tell me what this means. I am getting an error whenever I try to run this bit of code.
It is giving me the error during the indicated line.

Dim dbCarpetDatabase As DAO.Database
Dim rstSales As DAO.Recordset
Set dbCarpetDatabase = CurrentDb
Set rstSaless = dbCarpetDatabase.OpenRecordset("Sales")

---------> (Line in which error occurs) rstSales.AddNew
rstSales("Enquiry ID").Value = ComboEnquiryID.Column(1)
rstSales("Customer ID").Value = ComboCustomerSelect.Column(1)
rstSales("Date Purchased").Value = DateLabel
rstSales.Update

Any help would be appreciated thank you
 
Nevermind I figured it out, it was a typing mistake when i Set rstSales... :(
 

Users who are viewing this thread

Back
Top Bottom