nIGHTmAYOR
Registered User.
- Local time
- Today, 09:37
- Joined
- Sep 2, 2008
- Messages
- 240
Here is a peculier case that i was faced by alot and this is my discovered way around.
In a continuious form , if you managed to bind the primary key to a combo box you might be faced by weired cases of random value display in field in combo box that are not what were initialy assigned by user.
what is odd is that in actual table in on running form in Datasheet View , the field value is set correctly to value assigned by user , however in form view the problem remains.
This would lead the users to try and delete or modify the record despite that there is nothing realy wrong with it.
However one might think it'd be a sign of a corrupted database but however it is not , you can run whatever fix / analysis / migration tools but the problem will remain.
Reconstructing form from scratch helps , however copying / pasteing defected form controls copy the same problem to the newer form.
So how I managed to solve this error ? well by trial and error I managed to find this one solution that would save me the hassel of reconstruction from scratch and that'd be :
The problem with such solution is that it renders form usage heavy since control will requery on every input.
Smarties will suggest Refresh / Repaint / Focus Cycle but no, nothing helps but requering and only in After Update event of combo box.
So anybody faced such problem before ?
In a continuious form , if you managed to bind the primary key to a combo box you might be faced by weired cases of random value display in field in combo box that are not what were initialy assigned by user.
what is odd is that in actual table in on running form in Datasheet View , the field value is set correctly to value assigned by user , however in form view the problem remains.
This would lead the users to try and delete or modify the record despite that there is nothing realy wrong with it.
However one might think it'd be a sign of a corrupted database but however it is not , you can run whatever fix / analysis / migration tools but the problem will remain.
Reconstructing form from scratch helps , however copying / pasteing defected form controls copy the same problem to the newer form.
So how I managed to solve this error ? well by trial and error I managed to find this one solution that would save me the hassel of reconstruction from scratch and that'd be :
Code:
In After Update event of combo box control enter the following code:
Me![combo_box_name_here].Requery
Smarties will suggest Refresh / Repaint / Focus Cycle but no, nothing helps but requering and only in After Update event of combo box.
So anybody faced such problem before ?
