Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / November 2006

Tip: Looking for answers? Try searching our database.

Run time error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joseph - 15 Nov 2006 23:17 GMT
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 !
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.