View Full Version : Sql Start And End Date Query


David92595
02-08-2012, 01:28 PM
I need to run a query using a sql 2008 R2, with an access 2007 front end. The query needs to allow me to set parameters for a start date and an end date. Any suggestions?

David92595

mdlueck
02-08-2012, 05:22 PM
Any suggestions?

With what part of it?

tehNellie
02-09-2012, 02:50 AM
Create a stored procedure with two parameters StartDate and EndDate perhaps.

MSAccessRookie
02-09-2012, 04:03 AM
I need to run a query using a sql 2008 R2, with an access 2007 front end. The query needs to allow me to set parameters for a start date and an end date. Any suggestions?

David92595

It sounds like you should be able to use a Basic MS Access parameter Query in this case. The following link provides examples of parameter Queries, along with explanations. See if it helps you to resolve the issue on your own, and get back with any questions.

http://office.microsoft.com/en-us/access-help/using-parameters-with-queries-and-reports-HA001117077.aspx

mdlueck
02-09-2012, 04:30 AM
Create a stored procedure with two parameters StartDate and EndDate perhaps.

Yes, the OP could do that. I have an example of that here:

"Using VBA ADO objects to execute a Stored Procedure"
http://www.access-programmers.co.uk/forums/showthread.php?t=216860#post1104120

Usually I use an adoRS object and run the query in Pass-Through mode to SELECT records, and SP's to INSERT / UPDATE data.

"Client/Server Architecture"
http://www.access-programmers.co.uk/forums/showpost.php?p=1110794&postcount=5

I think we have enough collective ideas. Now to hear from the OP I think is next.