Enable/Disable textbox based on combobox value

Ratib Hussaini

Registered User.
Local time
Today, 04:04
Joined
Nov 7, 2012
Messages
31
Hello everyone,, I am facing a problem in my database, I searched this forum and googling but couldnt solve my problem. I have a form name purchase order, there in payment information tab, i have a bound combo box, which has 3 values (different countries currancey) and have 3 bound text boxes which are disabled by default.
by selecting anyone value from the combo box, one of the text box should be enabled with value =0 and rest of them should be disabled by value=0.

e.g. I will select Dollar from combo box, the text box which is named txtDollar should be enabled and rest of the two textboxes should be disabled their values should be = 0.
But when I select a value from combobox it shows following error:
"the data has been changed

another user edited this record and saved the changes before you attempted to save your changes.
re-edit the record."


I wrote my code in combobox after update event. Your help will be highly appreciated. thanks
 
Rather than have a text box for each currency (which on the face of things would point to a de-normalised table structure) you should simply store you values in the one field with an additional field to indicate which currency it is in. You would need a junction table with dates and exchange rates for those dates and the applicable currency.

The attached might give you some inspiration.
 

Attachments

thank you, I got your point and the attachment is helpful, but it will take time for me to change it,, for now if possible could you please tell me how to solve this error,,, and one thing more I checked that by changing any controls on the same tab shows the same error, and by clicking OK it works fine. and one thing more for your kind information by starting the form this particular tab is disabled and by clicking the approve purchase button it become enable. This is Northwind sample database, i made changes according to my need. I have tried to attached the Northwind database but the size is more than the limit, if you could please check it once, On purchase order details form after clicking approve purchase the payment information become enable, and by doing any changes it shows the same message. thanks again
 

Users who are viewing this thread

Back
Top Bottom