| |
You are here: Experts > Computing/Technology > Business Software > Using MS Access > Save value unbound textbox
Expert: Richard Rost - 10/28/2009
Question hello there,
I have a question concerning an unbound textbox. The controlsource of the textbox is the following: =Categorypub.Column(2) , as it refers back to a combobox. However, I would like to save this value into my table in the field ´budgetcategory´. I do not seem to be able to do this, as the controlsource is already populated. Can you help me out?
Thanks!
Answer Is the combobox bound? That should be what you use to save the value in the table.
Otherwise, you'd have to use an AfterUpdate event for the combobox to save the value, and that's going to involve some programming.
If you want to do it your way, instead of setting the control source of this text box to a calculated value, say this in the AfterUpdate event of the COMBO box:
TextBoxName = Categorypub.Column(2)
That should do it.
You can use an AfterUpdate or BeforeUpdate event to set values, change properties, run macros, and do lots of other cool things.
The major difference between the two is that BeforeUpdate runs BEFORE the data is saved to the table, which allows you to CANCEL the update if the data is not valid. AfterUpdate runs after the data is saved to the table.
Please see the following FREE video tutorial on my web site for step-by-step instructions on how to create an AfterUpdate event:
http://599cd.com/tips/access/afterupdate-event-vba?key=AllExperts
Let me know if you have any other questions or comments.
Also, be sure to visit my web site and watch my FREE 90-minute MICROSOFT ACCESS VIDEO TUTORIAL. Go to http://www.599cd.com/Access/AllExperts
Cordially,
Richard Rost
599CD Computer Training
http://www.599cd.com
P.S. Also, don't forget to visit my FREE Microsoft Access Tips & Tricks Page at http://www.599cd.com/Tips/AllExperts
P.P.S. I volunteer my time at AllExperts to help people, and I get a LOT of questions, so I can't take an hour to answer each question. If you need more DETAILED HELP, come to my TechHelp web site at http://www.599cd.com/TechHelp/AllExperts and I'll take as much time as you need to answer your question.
http://www.599cd.com/Microsoft_Access_Tutorial?key=AllExperts
I hope this information helps to solve your problem. If there is ANY REASON why you won't give me a RATING of 10 please let me know so I can improve upon my answers in the future. Thank you!
Sign up for my FREE NEWSLETTER with lots of TIPS and TRICKS. Visit http://www.599cd.com/MailingList?key=AllExperts
Out of work? Know someone who is? Get a FREE copy of my Computer Job Skills CD at http://www.599cd.com/JobSkills?key=AllExperts
Add to this Answer Ask a Question
|
|