Calling a Stored Procedure from VBA

Joined
Oct 10, 2005
Messages
2
Reaction score
0
Hi there,

I am currently working on a project for a client where I use an MS Access front-end (ADP) and a SQL Server/MSDE back-end. For this project I created a stored procedure accepting two parameters (see code below).

Code:
CREATE PROCEDURE dbo.GetEmails @TrainingID int, @RegCat int AS
SELECT Person_ID, CallingName, Insertion, FamilyName, Email
FROM qryPersonTrainings
WHERE Training_ID = @TrainingID
AND RegCat=@RegCat
GO

I am able to connect to this using a Recordset, but what I want to do is show the results of this Stored Procedure immediately to the client. I tried to use the DoCmd.OpenView or DoCmd.OpenStoredProcedure calls, but these do not accept paramters.

Does somebody have the solution or code-snippet for me?

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top