Link to home
Start Free TrialLog in
Avatar of jonsuns7
jonsuns7

asked on

Calling an SQL Stored Procedure from inside Access VBA

Hi Everybody,

I have a Microsoft Access VBA application that I need to call a stored procedure named "sp_ContactUpdate". When it calls this procedure, it will also pass a parameter as input for the procedure.

Basically, what happens is that after the user clicks a button on a form, a number of tasks take place. This calling of the stored procedure, would be the eighth task.

I have tried to used the following format, but it does not seem to work. I am open to any suggestions. Thank you so much for your help.

EXEC sp_ContactUpdate(Variable_to_be_passed)

In Code it looks like this:
EXEC sp_ContactUpdate(AppRefID)

Something tells me I'm close
Avatar of momi_sabag
momi_sabag
Flag of United States of America image

have you tried
EXEC sp_ContactUpdate AppRefID
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>Something tells me I'm close<<
It depends.  Yes that code will execute from SSMS, but if you are using MS Access you should be using ADO and not T-SQL, so if I were to guess I would say you are some ways off.