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

Tip: Looking for answers? Try searching our database.

expecting one parameter

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bindurajeesh - 28 May 2008 20:56 GMT
I have the following code:

strsql1 = "select * from los_service where (los_service.los_service_date =
#" & Forms!frm_administration_menu!rpt_date & _
             "# and los_service.service = 'PRAG') or
(los_service.los_service_date = #" & _
             Forms!frm_administration_menu!rpt_date & "# and
los_service.service = 'PRAI')" & _
             " or (los_service.los_service_date = #" &
Forms!frm_administration_menu!rpt_date & _
             "# and los_service.service = 'SE/CPST') or
(los_service_los_service_date = #" & _
             Forms!frm_administration_menu!rpt_date & "# and
los_service.service = 'SB/CPST')" & _
             " order by los_service.member_number, los_service.los_beg_time"

  Set rs = CurrentDb.OpenRecordset(strsql1)

this breaks at setting the rs saying that too few parameters are present.
I have tried setting a querydef and then assigning the parameter
(qdf![forms!frm_administration_menu!rpt_date) a value and then the error says
it cannot find the object in the collection.  What am I doing wrong.
Brent Spaulding (datAdrenaline) - 29 May 2008 07:45 GMT
Is the form "frm_administration_menu" open when you try to execute the SQL
statement? ... is "los_service" as Table or a Query object?

Signature

Brent Spaulding | datAdrenaline | Access MVP

>I have the following code:
>
[quoted text clipped - 20 lines]
> says
> it cannot find the object in the collection.  What am I doing wrong.
 
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.