J
Joseph
I am receiving run time error '3251' with the message: "Operation is not
supported for this type of object" at line 7 (rcdOrders.FindFirst
"rcdOrders![....) during execution of the following code:
Private Sub MarginForProduction_AfterUpdate()
Dim db3 As DAO.Database
Dim rcdOrders As DAO.Recordset
Dim NumberOfDates As Double
Set db3 = CurrentDb
Set rcdOrders = db3.OpenRecordset("tblOrders", dbOpenTable)
' PONumber is text
rcdOrders.FindFirst "rcdOrders![PONumber] = '" & Me![PONumber] & "'"
If Not rcdOrders.NoMatch Then
rcdOrders.Edit
NumberOfDates = rcdOrders![DateMaterialsOrder] +
rcdOrders![MarginForProduction] + rcdOrders![ProductionTime]
rcdOrders![StartDateProd] = DateAdd("d", -NumberOfDates, Me![PromisedDate])
rcdOrders.Update
End If
End Sub
Where is my mistake?
Your help is appreciated !
supported for this type of object" at line 7 (rcdOrders.FindFirst
"rcdOrders![....) during execution of the following code:
Private Sub MarginForProduction_AfterUpdate()
Dim db3 As DAO.Database
Dim rcdOrders As DAO.Recordset
Dim NumberOfDates As Double
Set db3 = CurrentDb
Set rcdOrders = db3.OpenRecordset("tblOrders", dbOpenTable)
' PONumber is text
rcdOrders.FindFirst "rcdOrders![PONumber] = '" & Me![PONumber] & "'"
If Not rcdOrders.NoMatch Then
rcdOrders.Edit
NumberOfDates = rcdOrders![DateMaterialsOrder] +
rcdOrders![MarginForProduction] + rcdOrders![ProductionTime]
rcdOrders![StartDateProd] = DateAdd("d", -NumberOfDates, Me![PromisedDate])
rcdOrders.Update
End If
End Sub
Where is my mistake?
Your help is appreciated !