cbaker
10-23-2008, 02:47 PM
I am very new to VBA and have run in to an issue that I have not been able to find the solution to through web searches.
I have an ADP with an Access form connecting to a SQL Server database. On this form, I have a combo box that is populated by a stored proc going against another database on this SQL Server. I am pulling back 3 values in the sproc, am displaying 2 of them in the combo box and want the third value to display in a display-only text field upon selection.
The part I am having difficulty with is I have found the way to get this text box to display the related value from the combo box is to set it's Control Source to be the value of a column in the combo box. But how do I then write the value of the text box to the database upon submit? I have learned to use the control source to define the db field the control will write it's value to. Will I need to write an update statement to grab the value of this field and update the record after the submit writes the rest of the information to the DB?
Hopefully I've explained myself thoroughly enough. Thanks.
I have an ADP with an Access form connecting to a SQL Server database. On this form, I have a combo box that is populated by a stored proc going against another database on this SQL Server. I am pulling back 3 values in the sproc, am displaying 2 of them in the combo box and want the third value to display in a display-only text field upon selection.
The part I am having difficulty with is I have found the way to get this text box to display the related value from the combo box is to set it's Control Source to be the value of a column in the combo box. But how do I then write the value of the text box to the database upon submit? I have learned to use the control source to define the db field the control will write it's value to. Will I need to write an update statement to grab the value of this field and update the record after the submit writes the rest of the information to the DB?
Hopefully I've explained myself thoroughly enough. Thanks.