expecting one parameter

B

bindurajeesh

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.
 
B

Brent Spaulding \(datAdrenaline\)

Is the form "frm_administration_menu" open when you try to execute the SQL
statement? ... is "los_service" as Table or a Query object?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top