OtheymAverian
New member
- Local time
- Today, 14:59
- Joined
- Jun 1, 2007
- Messages
- 4
I am trying to call a stored procedure using DoCmd.RunSQL, but I need to pass a parameter as well. I cannot figure out how to do this. I have coded a variable that will take the input for the parameter, but I do not know how to associate it with my call.
Here is the code that I made before I got stuck.
Thank you in advance for your assistance.
Here is the code that I made before I got stuck.
Code:
Private Sub butMoveNDStoBO_Click()
On Error GoTo Err_butMoveNDStoBO_Click
Dim RecNo As Long
Dim SQL As String
RecNo = InputBox(Prompt:="Enter Record Number")
SQL = "EXEC usp_MoveNDS_to_BO"
DoCmd.RunSQL SQL
Exit_butMoveNDStoBO_Click:
Exit Sub
Err_butMoveNDStoBO_Click:
MsgBox Err.Description
Resume Exit_butMoveNDStoBO_Click
End Sub
Thank you in advance for your assistance.