Change the value of bounded field from form

saqibawr

Registered User.
Local time
Tomorrow, 01:35
Joined
Oct 3, 2008
Messages
27
If my text field is bounded with a combo box. Then how to change its value. For example if my price field is bounded with combo box and by entering the code in combo box price come in text box field and when i try to change it it says that value cant be changed because it is bounded with combo box. Now i want to create field that value come in this field from combo box but could be changed by the user from form.

Please Help????


:confused::confused::confused::confused::confused: :confused:
http://www.access-programmers.co.uk/forums/editpost.php?do=editpost&p=818208
 
Instead of binding to the combo box, bind to a field in your table. Then, in the AFTER UPDATE event of your combo box you can set the selection to be:

Me.YourTextBoxNameHere = Me.YourComboBoxNameHere.Column(x)

where x is the number (zero-based) of the column you want from the combo.
 
I have bounded the combo box to table. But i want that if it is possible to create a form that if value is bounded to a table it could be changed directly from the form with out going to table. I am uploading my sample database. Help please if possible????

:confused:
 

Attachments

I would redesign things if I were you. You might find this a good read:
http://www.accessmvp.com/strive4peace/Access_Basics_Crystal_080113_Chapter_03.pdf

But, I have modified your sample (and attached it here) so that the first row does what you want (you'll have to modify the others to fix the whole form). I added the code to the combo (look in the VBA window at that) and removed the =[R2]*[Q2] stuff from the text box control source and had to ENABLE and UNLOCK so that the user can enter data.
 

Attachments

I knew that. I created this database by my self but now what i m trying to ask is that the name of salesman is bounded to a combo box and it comes in text box by entering the code. But when i try to change it it is not changing. It said that this field is bounded with combo box. Is it possible to change value here without going to table???????????????
 
You would do the same with it that I did with the other fields. In the text box, remove the control source that is binding to the combo box and then add the code to the After Update event of the combo box (like I did with the product/price box).
 

Users who are viewing this thread

Back
Top Bottom