Unanswered: Using Stored Procedures With a List Box
I have a list box on an access form and I want the row source to be a stored procedure. If I use an SP with no parameters it works great. But I want to pass a parameter and have the source come from another text box or combo box on the same form. SO for the Row Source I have Exec MYSPName and that works good. Now I want to change it to Exec MYSPName @MyParam = Myform.cbo_Box.Value.
This doesn't work. Does anyone know how to get this to work?
I am setting this as the RowSource property directly using the properties of the list box on the form. Can you not use the parameters for a SP this way? If I am not being clear please let me know what info you need.
I'm not very experienced with ADPs but I think the problem is that the text string is passed to the server and parsed there. The server knows nothing about forms and controls - it just wants an absolute value not a reference to where it can find it.
So - Roy's idea is for vb to grab the value from the form and pass that (as a value) to the procedure. That sounds like the right idea to me.