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 / February 2008

Tip: Looking for answers? Try searching our database.

Compile Error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Del - 14 Feb 2008 22:09 GMT
What is wrong with this code.  I get a compile error on "!cboCycle" that says
"Method or data member not found".  If I change !cboCycle to !cboDept I get
the same error but !cboDept compiled earlier in this code.

DoCmd.RunSQL "UPDATE tblEquip INNER JOIN tblPMCurrentTasks ON
tblEquip.EquipID=tblPMCurrentTasks.EquipID " & _
           "Set tblPMCurrentTasks.[PerformedBy]='" & Me.txtPerformedBy &
"',tblPMCurrentTasks.[Done]= -1, " & _
           "tblPMCurrentTasks.[DateDone]=#" & Date & "#" & _
           "Where tblEquip.[Dept]='" & Forms!frmPM!cboDept & "' And
tblPMCurrentTasks.[PMCycle]='" & _
           Forms!frmPM!cboCycle & "' And tblEquip.[Line]='" & Me.cboLine &
"' And tblEquip.[EquipID]= " & _
           Forms!frmPM!txtEquipID & "and tblPMCurrentTasks.[Done]<>-1;"

Signature

Thank you,
Del

Jeanette Cunningham - 14 Feb 2008 23:18 GMT
Del,
Access gives this error, but not necessarily at the exact spot in the code.
In the posted code, these is a field, control, value that access can't find.
The quick way to troubleshoot is to go stepwise (from my experience at
least)
I do it like this:
Comment out all except the first line of the code sample, if that bit
compiles OK, then uncomment the second line and compile, if no errors,
uncomment the next line and compile, repeat until you find the troublesome
field or control.

Jeanette Cunningham

> What is wrong with this code.  I get a compile error on "!cboCycle" that
> says
[quoted text clipped - 12 lines]
> "' And tblEquip.[EquipID]= " & _
>            Forms!frmPM!txtEquipID & "and tblPMCurrentTasks.[Done]<>-1;"
 
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.