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 !
Damian S - 15 Nov 2006 23:52 GMT
Hi Joseph,
Try:
rcdOrders.FindFirst "[PONumber] = '" & Me![PONumber] & "'"
Damian.
> I am receiving run time error '3251' with the message: "Operation is not
> supported for this type of object" at line 7 (rcdOrders.FindFirst
[quoted text clipped - 19 lines]
> Where is my mistake?
> Your help is appreciated !
Joseph - 16 Nov 2006 07:13 GMT
Thanks for your help.
Unfortunately it doesn't work with your suggestion.
When I use the same code and open a query (instead of tblOrders) that
generates the appropriate fields for this form it works.
Is this command not supported for Tables?
> Hi Joseph,
>
[quoted text clipped - 27 lines]
> > Where is my mistake?
> > Your help is appreciated !