This is an example of how I create a report in an Access Data ProjectReference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10390
that uses SQL server 2000 as back end, this is in the Report Open
event, and I think CountsCombined is a function or stored procedure. I
construct the string using user selected values in a custom form, andReference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10390
then call up the report passing the string as a parameter. Then in the
reports on open event I get the paramter and set it to Me.RecordSource:
strRecordSource = "Exec CountsCombinedDescrNoSumChild '" &
Me![BeginDate] & "','" & Me![ChildCombo] & "','118'"
So basically you use the "Exec" keyword followed by the query name and
comma seperated list of parameters, each one in single quotes. I'm not
sure the details of if the query name has to be the name of an existing
SP, view, or function.