I have a button on a form to run a Stored Procedure - the code is below

Dim stProcedureName As String
stProcedureName = "spInsertRecord"
DoCmd.OpenStoredProcedure stProcedureName , acViewNormal, acEdit

The Stored Procedure has a parameter named @RecordID

I want the Parameter to be sent to the Stored Procedure when the buton is clicked - right now, a box opens asking for @RecordID

@RecordID is equal to a textbox on the form named txtRecordID

Is there syntax to send the parameter automatically?

Thanks - AB