I have created an Access 2010 project that is connected to a SQL Server database. I have created a stored procedure sp_retrieveinfo
that contains two input parameters which are text boxes on a forn (text1 and text2).
Following the update of the cmbabc field I have attempted to populate another combo box called cmbdef using the rowsource function.
Below is the code
Private Sub cmbabc_AfterUpdate()
Me!cmbdef.Rowsource = "sp_retrieveinfo '" & Me.text1 &" ', " & Me.text2 & "'"
I receive the following error message when I select the cmbdef field.
'The record source 'sp_retrieveinfo ... specified on this form or report does not exist'.
If I amend the SQL stored procedure to use no input parameters and amend the code in Access, this works fine. Can anyone help?