I have an Access 2003 adp project. There's a lot of reports in this adp that used to be based on queries that referenced controls on forms. As part of the upgrade process I've changed the record source of the reports to stored procedures with input parameters. I've been setting the input parameters in the Reports' on Open event:

Me.InputParameters = "@StartDatex datetime = [Forms]![frmJobReport]![txtDateStart].[Value], " _
& "@FinishDatex datetime = [Forms]![frmJobReport]![txtDateFinish].[Value], " _
& "@MachineNumberx int = [Forms]![frmJobReport]![txtSelectMachineNumber].[Value], " _
& "@JobTypex Int = [Forms]![frmJobReport]![cboxSelectSubJob].[Value], " _
& "@JobIDx int = [Forms]![frmMainReports]![ctlJobID].[Value]"

But this is proving very difficult. Syntax that works for one form doesn't work for another. When I think I've got it correct it's still prompting me for the parameters when the report is opening. What I'd like to know is:

a)Is there a better way to go about passing parameters to stored procedures. I have toyed with setting up functions that reference globals.

b) Is there something wrong with any of the syntax above?

Any help would be much appreciated as this is doing my nut in.