Answered by:
list values from combo

Question
-
hi for all
I have one table with many fields , one of these fields have comb box that is list all values by lookup from another table in the same database , i need to do when Im choose value from the list the comb the corresponding data put at the other fields of the table
why to do that
Monday, September 5, 2016 6:21 PM
Answers
-
Hi wissam alshamy,
By assigning the Column property of a multiple-column combo box or list box to a text box, you can display one column from the current combo box selection in the text box. Microsoft Access automatically updates the text box when a selection is made from the combo box.
For more information, click here to refer about Microsoft Access: How to Use the Column Property of a Combo Box to Update a Text Box
- Marked as answer by wissam alshamy Thursday, September 8, 2016 10:53 AM
Thursday, September 8, 2016 6:14 AM
All replies
-
Hi Wissam,
You need to handle the combobox change event so that when a value is selected from the combo box you change the list.
See https://msdn.microsoft.com/en-us/library/office/ff836326.aspx?f=255&MSPPError=-2147217396
Thanks, Mahmoud
Monday, September 5, 2016 6:36 PM -
Hi,
If you're saying you want to "transfer" the information from the other table into the table where you have the combobox, then stop. You don't need to do it. Actually, it's against Normalization rules to store duplicate information in multiple tables. You can just bind the combobox field to the primary key of the lookup table and when you need the other information, you can use a query to join the two tables on the combobox field and display the other fields from the lookup table in your query. You can then use the query in your forms or reports.
Just my 2 cents...
Monday, September 5, 2016 8:27 PM -
Hi wissam alshamy,
According to your description, you could populate text boxes with multicolumn Combo Box selections.
For more information, click here to refer to How to populate text boxes with multicolumn Combo Box selectionsThanks for your understanding.
Tuesday, September 6, 2016 3:22 AM -
Hi wissam alshamy,
According to your description, you could populate text boxes with multicolumn Combo Box selections.
For more information, click here to refer to How to populate text boxes with multicolumn Combo Box selectionsThanks for your understanding
----------------------------------------------------------------
Dir Sir
in
Private Sub cboNames_AfterUpdate() Me.txtFirstName = Me![cboNames].column(1) Me.txtLastName = Me![cboNames].column(2) Me.txtTitle = Me![cboNames].column(3) End Sub
what do u mean of
column(1)
column(2)
Tuesday, September 6, 2016 11:11 AM -
Hi wissam alshamy,
By assigning the Column property of a multiple-column combo box or list box to a text box, you can display one column from the current combo box selection in the text box. Microsoft Access automatically updates the text box when a selection is made from the combo box.
For more information, click here to refer about Microsoft Access: How to Use the Column Property of a Combo Box to Update a Text Box
- Marked as answer by wissam alshamy Thursday, September 8, 2016 10:53 AM
Thursday, September 8, 2016 6:14 AM