MisawaPlayer
New member
- Local time
 - Yesterday, 17:57
 
- Joined
 - May 6, 2011
 
- Messages
 - 5
 
I have a SQL Server database along with all of its associated stored procedures.  I am trying to use Access (2003) as a project, to create a front end to the database.  If I simply execute one of the shown stored procedures that requires parameters, it asks me to input them.
I want to create a form where the parameters will be entered (a range of dates for example), then click a button to execute the stored procedure, passing the parameters without asking me to enter them.
I added a button to my form, and using the wizard, selected the stored procedure as the action. This runs it, and asks me for the parameters.
How do I change the VBA command that executes the procedure so that it passes parameters that I build on the fly.
For example, in SQL Server, the command is:
             
	
	
	
		
I want to build this string and have it executed.  How do I do this please?  I know enough about VBA to get the data from the form, just not how to call the stored procedure.
Thanks for any help on this. I've been searching all over. I have seen similar questions, but none of them seem to be right for my situation.
 I want to create a form where the parameters will be entered (a range of dates for example), then click a button to execute the stored procedure, passing the parameters without asking me to enter them.
I added a button to my form, and using the wizard, selected the stored procedure as the action. This runs it, and asks me for the parameters.
How do I change the VBA command that executes the procedure so that it passes parameters that I build on the fly.
For example, in SQL Server, the command is:
		Code:
	
	
	exec FuelMileage '4/1/2011', '4/30/2011'
	Thanks for any help on this. I've been searching all over. I have seen similar questions, but none of them seem to be right for my situation.