If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Form with an unbound combo box.
I´m trying to create a database but I take some examples from Inside Out 2007
by Viescas.I create a tblTeams ( TeamID,TeamName) tblPlayers(PlayerID) and tblTeamPlayers(TeamID,TeamName,PlayerID). I create a form based on qryplayers and I need a combobox "unbound?" called TeamName based on qlkqTeams but when I try to open the combobox always shows the TeamID instead of TeamName. In the sample database "Contacts" from Viescas the CompanyName is display in the combobox CompanyID. I don´t really Know how this happen.Can anybody give me an idea of how this works? Thanks -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/201002/1 |
#2
|
|||
|
|||
Form with an unbound combo box.
On Wed, 17 Feb 2010 23:05:52 GMT, "JOSELUIS via AccessMonster.com"
u58123@uwe wrote: In the sample database "Contacts" from Viescas the CompanyName is display in the combobox CompanyID. I don´t really Know how this happen.Can anybody give me an idea of how this works? Thanks A Combo will display the first *non zero width* column in its rowsource. The RowSource is where the combo gets its data from. This is typically a Query; it can have many (up to ten, I believe) fields. The ColumnCount property specifies how many of those columns are available. The Bound Column defines which of the fields will become the combo's value when a selection is made. The Control Source is the name of the table field into which that value will be stored (this can be blank, if the purpose of the combo is other than storing a value in a table). The ColumnWidths is a string of numbers separated by semicolons, defining the display width of each column; if a column is of zero width, it's part of the combo but not shown to the user. For example, you could have a RowSource query like SELECT CustomerID, LastName & ", " & FirstName AS CustName, CustAddr, CustPhone, LastName, FirstName FROM Customers ORDER BY LastName, FirstName; If the combo has ColumnCount = 4 only the ID, full name, address and phone will be included in the combo's data. The Bound Column would be 1 - so that the ID will be stored. If the ColumnWidths property is 0";1";1.5";.5" the user will see the customer's name when the combo is not dropped down (e.g. "Vinson, John", and the address and phone will be after it when it is dropped down. The CustomerID will not show because its width is zero. -- John W. Vinson [MVP] |
#3
|
|||
|
|||
Form with an unbound combo box.
Thank you vey much for your help. You really do it simple and clear so thank
you very much from Spain. John W. Vinson wrote: In the sample database "Contacts" from Viescas the CompanyName is display in the combobox CompanyID. I don´t really Know how this happen.Can anybody give me an idea of how this works? Thanks A Combo will display the first *non zero width* column in its rowsource. The RowSource is where the combo gets its data from. This is typically a Query; it can have many (up to ten, I believe) fields. The ColumnCount property specifies how many of those columns are available. The Bound Column defines which of the fields will become the combo's value when a selection is made. The Control Source is the name of the table field into which that value will be stored (this can be blank, if the purpose of the combo is other than storing a value in a table). The ColumnWidths is a string of numbers separated by semicolons, defining the display width of each column; if a column is of zero width, it's part of the combo but not shown to the user. For example, you could have a RowSource query like SELECT CustomerID, LastName & ", " & FirstName AS CustName, CustAddr, CustPhone, LastName, FirstName FROM Customers ORDER BY LastName, FirstName; If the combo has ColumnCount = 4 only the ID, full name, address and phone will be included in the combo's data. The Bound Column would be 1 - so that the ID will be stored. If the ColumnWidths property is 0";1";1.5";.5" the user will see the customer's name when the combo is not dropped down (e.g. "Vinson, John", and the address and phone will be after it when it is dropped down. The CustomerID will not show because its width is zero. -- Message posted via http://www.accessmonster.com |
#4
|
|||
|
|||
Form with an unbound combo box.
On Thu, 18 Feb 2010 23:34:37 GMT, "JOSELUIS via AccessMonster.com"
u58123@uwe wrote: Thank you vey much for your help. You really do it simple and clear so thank you very much from Spain. El gusto es mio. -- John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|