Hi Gang!
I have a grid that is doing some intermittent changing of a value that should not be changing.
I have a table open (a Doctor table), that has a field called doc340B (Logical).
This field is the control source for a checkbox control that is a column of a grid.
This checkbox column readonly property is set to be .T..
I have code in the the grid keypress method as follows...
LPARAMETERS nKeyCode, nShiftAltCtrl
DO CASE
CASE nKeyCode = 4
IF This.Parent.cboOrder.ListIndex = This.Parent.cboOrder.ListCount
This.Parent.cboOrder.ListIndex = 1
ELSE
This.Parent.cboOrder.ListIndex = This.Parent.cboOrder.ListIndex + 1
ENDIF
This.Parent.cboOrder.InteractiveChange
This.AllowCellSelection = .T.
NODEFAULT
CASE nKeyCode = 19
IF This.Parent.cboOrder.ListIndex = 1
This.Parent.cboOrder.ListIndex = This.Parent.cboOrder.ListCount
ELSE
This.Parent.cboOrder.ListIndex = This.Parent.cboOrder.ListIndex - 1
ENDIF
This.Parent.cboOrder.InteractiveChange
This.AllowCellSelection = .T.
NODEFAULT
CASE nKeyCode = 13
This.AllowCellSelection = .T.
Thisform.m_Next()
OTHERWISE
IF Thisform.m_DataKeyPress(nKeyCode,.F.)
Thisform.pgfScreen.RapidPage.txtSearch.value = Thisform.p_Buffer
Thisform.m_seek(UPPER(Thisform.p_Buffer),"doctor","",0)
This.refresh
ENDIF
ENDCASE
When I press
on the grid, I go to the next screen - good.
If I go back to THIS screen with the grid, and press on the grid again, I go to the next screen again - good again.
I can repeat this over and over - press , go to the next screen, then go back to the grid to repeat this over and over.....
BUT!!.............
Once in while (about every 5 attempts), when I press on the grid, I get a wait window that says "The control is read-only".
Why????????
And, now the control has changed the value of the field!!! If I go back to the grid, the value has changed. I then have to edit the record of the grid to set the value back.
Any idea why this happens randomly???
Thanks!!!
Tommy Tillman A+ NetWork+ MCP