Passing Value from unbound text box to a table from a Data Entry Form
Posted on 2010-11-09
I have what I think should be a simple question, but I'm probably making it harder than it needs to be.
I'm hoping to set up a form that allows an end-user to input financial allocations on a person-by-person basis for financial commitments we have. A person must be entered into the DB before they can be allocated $. The cbo_PersonNum referred to below is driven from the list of persons who were entered into the DB.
I have a value cbo_PersonNum on a data entry form that displays four values:
1) Person Number
2) Last Name
3) Preferred Name
When a value is selected, I want to pass the other values to three separate text boxes below cbo_PersonNum. So, after a value has been selected I want
1) txt_LastName = cbo_PersonNum.Column(1)
2) txt_PreferredName = cbo_PersonNum.Column(2)
3) txt_Department = cbo_PersonNum.Column(3)
I have the part where the Text boxes display the value (the text box control source(s) is the the right side of the equations above). However, when I save the record, since the Text Boxes are essentially unbound (Control Source is not a field on the underlying table), the values do not pass to the table, so this is where I need help. I need to pass these values to the table and be sure that the values cannot be changed from what the cbo_PersonNumber passes.
I'm open to considering other object types than a text box, I just need to pass the values into the table, even though may be better database normalization not to do so.
Thanks for any help.