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

passing string to table

P: 27
I set a string value up and took it from my drop down box, I now want to send this value to a field in my table. How can I do this?
Mar 21 '07 #1
Share this Question
Share on Google+
3 Replies


missinglinq
Expert 2.5K+
P: 3,532
You have to have a textbox on your form bound to the field in your table, call it YourTargetTextBox. Assuming that the combobox is named YourComboBox, place this code behind the combobox OnClick event:

Expand|Select|Wrap|Line Numbers
  1. Private Sub YourComboBox_Click()
  2.   Me.YourTargetTextBox.Value = Me.YourComboBox.Value
  3. End Sub
Mar 21 '07 #2

P: 27
I bound the combo box (drop down) to another table, it filters clients, I sent the selection from the dropdown to a string called strCustomer, I want to send this to a new table, just the string value. The thing is, I don't want all the selected values being entered into the table I print, maybe an overall table of records that were chosen, but I want to be able to print one instance of the selection out for a bench sheet. It looks sort of like this.

TablePrint
TableCustomers
TableTests
frmCustomers (which has drop down menus for (customername, customer test), and than in each drop down menu, I passed the value to a string, which is working fine, I was able to get this working fine. I tested it with a message box and my string did show up fine.

Now I want to take this string and send it to a table when I click the command print button, which will print the bench sheet (for the one selection) and than store it to a table. However, if the user changes their mind, I am going to clear the value before it is stored in the table. This I can do. I want to know how to send strCustomer and strTest to a table possibly a new table that I make. I need to know where in the table settings I can set the value to be a string value even if it has to be global. I tried in the rowsource, but I can't figure it out.

Justin
Mar 22 '07 #3

P: 27
I honestly forget how to bind a field in a table to a textbox, I clicked on the wizard and than on textbox clicked on table and dragged it to form but it is saying subform, I want it bound to the field not be a subform report.
Mar 23 '07 #4

Post your reply

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