By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,466 Members | 1,588 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,466 IT Pros & Developers. It's quick & easy.

Can't use textbox in form to populate a table

P: 23
Forigive me for posting something which probably has a simple solution, but I can't find the solution and it's giving me fits. Here's my issue. I have two tables. One is simply a list of customers which is more or less static. I use the data from that table to populate a field in the second table, which is a list of all transactions. I use a form to enter the data into the second table. However, when I use a combo box in the form to choose data from the first table and use that data to populate the second table, it inserts the data into the second table not as a customer name but simply as a single digit number. I imagine it's simply a problem with properties but I have been unable to locate the specific problem. Could someone please help?
Oct 9 '07 #1
Share this Question
Share on Google+
2 Replies


ADezii
Expert 5K+
P: 8,597
Forigive me for posting something which probably has a simple solution, but I can't find the solution and it's giving me fits. Here's my issue. I have two tables. One is simply a list of customers which is more or less static. I use the data from that table to populate a field in the second table, which is a list of all transactions. I use a form to enter the data into the second table. However, when I use a combo box in the form to choose data from the first table and use that data to populate the second table, it inserts the data into the second table not as a customer name but simply as a single digit number. I imagine it's simply a problem with properties but I have been unable to locate the specific problem. Could someone please help?
It's probably a problem with the Column property which you can use to refer to a specific Column, or Column and Row combination, in a multiple-column Combo Box or List Box. The Combo Box is simply returning the value of the Bound Column which is typically, but not always, the 1st Column (Column(0)). To return the value of another Column, simply refer to the Column Number - 1. For example, if a Customer's Name is the 4th Column in a Combo Box and you want to transfer this value to say a Text Box named txtCustomerName on the active Form:
Expand|Select|Wrap|Line Numbers
  1. Me![txtCustomerName] = Me!cboComboName.Column(3)
Oct 9 '07 #2

P: 23
Thank you for the quick reply and the advice. That was exactly the problem. Most appreciated.
Oct 9 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.