Hi!
I do not know what is the SELECT statement looks exactly, but I will try to imagine it...
Remember that if you use table in the SELECT statement, and table is bufferent, only phisical data are used. Buffered data are not used in such case, so if first checkbox was checked, but in buffered table another logical field is true, SELECt statement will get the first value (that is on disk), it will not get the value from memory (buffered).
In your case, in the click of the checkbox remember the ID of the record in certain property on the form as it is the ID of the record for which that logical field is True. Than in the SELECT statement get record data using that ID value as a parameter for the query, instead of joining the optimistic buffered table.
HTH.
>Hi,
>
>Something is happening that I don't understand.
>
>A table is buffered optimistic table. In a grid column I added a checkbox chkMainContact which is bound to field lMainContact of that table. I want that field to function sort of like a vertical option button (only one can be checked).
>
>In the click method of chkMainContact I replace lMainContact of all other records with false if This.Value is true. I can confirm via a browse that this actually happened as expected. Then, in the same click method, I call ThisForm.ATextField.Refresh(). In that refresh I do a sql select into an array placing as a condition that lMainContact be true, to extract the name of the main contact, but... the name in the first row is picked up even though it doesn't meet the condition.
>
>What is happening ?
>
>TIA,
>
>Alex
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.