User input parameters to passthrough query

W

William Garves

Hi,

This is my problem:

I have a Stored Procedure on a SQL database that I have
connected to using a pass through query.

The SP needs two dates to execute. I can do this by
placing the dates into the query Builder. Like this:

EXEC EXEC uspTeam_Results '3/1/04', '3/31/04'.

How do I get the pass through query to run by using the
dates inputted buy the user on the form? I have used

DoCmd.OpenQuery "queryname" me.txtStartDate, me.txtEndDate
DoCmd.OpenStoredProcedure "queryname" me.txtStartDate,
me.txtEndDate

Neither work, I have also tried to use parameters for the
query name, and the text boxes but they don't work either.

Any help would be greatly appreciated. I haven't used
Access in a couple of years and the solution just plum
avoids me.

Thanks,

William Graves
 
Top