Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have a form that is based on a stored procedure. How do I pass parameter values from a combo box to the stored procedure? In other words, how do I input data into the combo box so that I can save it into the table it gets its data from, rather than tediously going into the table itself and inputting the data?
Thanks in advance.

I'm not sure I understand what your doing. You state "I have a form that is based on a stored procedure." What is a Stored Procedure? A form's data source can be either a table or a query. Is your stored procedure a query?
Also, you state "so that I can save it into the table it gets its data from." What does "it" refer to. Is "it" the value in your combobox? Generally, a combobox is used to look up a range of values based on a query. For example, you might have a combobox that lists all your customers. If you want to add a new customer (not in the list), then you would add the customer using the customer form. Not the combobox.
If you want to insert a record into a table based on the selection you chose from the combobox, then you either have the form's data source = to that table or you use an action query in one of the forms or controls events. For example you can use the After Update event to run a query.

The form's data source is a table. "It" is the value in the combo box that I want to save in the table. While it is true the combo box's primary function is to look up a range of values, I did manage to store a value into the table used as the data source. Perhaps it was a fluke, but nonetheless, the value was stored as were the other values for the other fields that I entered information for. My problem is trying to replicate it...permanently.

Ok I think I understand what you are doing. In the properties of the combo box, look for the control source property. You should be able to select the field form your table that you want to store the data in. Make sure the bound column is the correct column of data you wish to record.
Once a new record is entered in your form the value in your combo box will save as well.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |