Problem with radio buttons
Headbanger -- rpudupet@top.eng.utoledo.edu
Tuesday, March 18, 1997
Environment: VC++4.0, NT 3.51, Access 2.0
Hi,
I have been using DAO classes to perform my database operations. I used
radio buttons to represent an integer field in the database. Since
DDX_FieldRadio uses a zero based index, and my field values were 1 and
above (zero for a new record), I tried to be cute and set an invisible
radio button as the group button. This way the I would know if the record
had been initialized or not. The problem is that when I make a change in
this record from the invisible buttons to the visible ones and update the
recordset, an assertion is thrown. I found out that this is because
DDX_FieldRadio needs the current selected button to perform its
operations and my default button is invisible. There is no problem in
editing data when I am changing between the visible buttons. It is only
when I change from the invisible button to the visible ones and update
that the problem occurs. I guess that I have been pretty long winded but
I felt that I had to explain exactly what the problem was.
Please suggest a way around this mess. I dont want to alter the way the
database is set up because this would affect many other queries.
Thanks
Ram
Tim Robinson -- timtroyr@ionet.net
Friday, March 28, 1997
Don't know whether this will work or not, but you might try making the
control visible, but inactive and moved off the visible surface of the
dialog. (Press Alt when dragging as I recall, or edit the text of the RC
file yourself.)
At 04:14 PM 3/18/97 -0500, Headbanger wrote:
>Environment: VC++4.0, NT 3.51, Access 2.0
>Hi,
>I have been using DAO classes to perform my database operations. I used
>radio buttons to represent an integer field in the database. Since
>DDX_FieldRadio uses a zero based index, and my field values were 1 and
>above (zero for a new record), I tried to be cute and set an invisible
>radio button as the group button. This way the I would know if the record
>had been initialized or not. The problem is that when I make a change in
>this record from the invisible buttons to the visible ones and update the
>recordset, an assertion is thrown. I found out that this is because
>DDX_FieldRadio needs the current selected button to perform its
>operations and my default button is invisible. There is no problem in
>editing data when I am changing between the visible buttons. It is only
>when I change from the invisible button to the visible ones and update
>that the problem occurs. I guess that I have been pretty long winded but
>I felt that I had to explain exactly what the problem was.
>Please suggest a way around this mess. I dont want to alter the way the
>database is set up because this would affect many other queries.
>Thanks
>Ram
>
>
>
| Tim Robinson | Once you let go of your liberty, you |
| http://www.ionet.net/~timtroyr | won't easily get it back. -- Plautus |
Become an MFC-L member
| Вернуться в корень Архива
|