Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid behavior under 9.0 vs 8.0
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01556084
Message ID:
01556088
Views:
39
>Somehow the focus is getting moved from the grid to the command button in VFP 8 vs VFP 9..... how it behaves in VFP 8 is how the programmers set it up for (the correct behavior).
>
>Here is the code in the KEYPRESS of the GRID...
>
>
>LPARAMETERS nKeyCode, nShiftAltCtrl
>
>if nkeyCode = 27
>	thisform.m_close
>endif
>
>WITH Thisform
>	IF Thisform.m_DataKeyPress(nKeyCode,.T.)
>		.txt_name_rx.value = Thisform.p_Buffer
>	ENDIF
>ENDWITH
>
>
>IF nKeyCode = 13 OR nkeyCode = 32	&& Enter or space bar
>	IF EMPTY(THISFORM.txt_name_rx.value)
>		thisform.txt_name_rx.value = ALLTRIM(STR(rx_number)) + CHRTRAN(STR(refill_no,2),' ','0')
>	ENDIF
>	IF Thisform.m_seek_bar()
>		thisform.p_keyboard = .t.
>		thisform.m_close
>	ELSE
>		thisform.grdUnpdrx.SetFocus
>	ENDIF
>ENDIF
>
>
>and m_seek_bar
>
>
>LOCAL llreturn
>
>llreturn = .f.
>
>*SELECT UNPDRX
>
>SELECT unpd_pat
>
>IF ISDIGIT(thisform.txt_name_rx.value)
>	mRx_Refill = thisform.txt_name_rx.value
>	IF LEN(ALLTRIM(mRx_Refill)) = 9 OR LEN(ALLTRIM(mRx_Refill)) = 8
>		DO CASE
>			CASE LEN(ALLTRIM(mRx_Refill)) = 9
>				mRx		= VAL(SUBSTR(mRx_Refill,1,7))
>				mRefill = SUBSTR(mRx_Refill,8,2)
>				mRefill = '0' + mRefill
>				mRefill = VAL(mRefill)
>			CASE LEN(ALLTRIM(mRx_Refill)) = 8
>				mRx		= VAL(SUBSTR(mRx_Refill,1,6))
>				mRefill = SUBSTR(mRx_Refill,7,2)
>				mRefill = '0' + mRefill
>				mRefill = VAL(mRefill)
>		ENDCASE
>*		SET ORDER TO RX_NO
>*		IF SEEK(CHRTRAN(STR(mRx,7),' ','0') + STR(mRefill,3)) AND PU_DATE = {  /  /  } AND SELECT = .F.
>		LOCATE FOR RX_NUMBER = mRx AND REFILL_NO = mRefill  AND EMPTY(PU_DATE) AND SELECT = .F.
>		IF FOUND()
>			llreturn = .t.
>			thisform.txt_name_rx.Value = ""
>			thisform.p_buffer = ""
>		ENDIF
>	ENDIF
>	
>ENDIF
>RETURN llreturn
>
>
>Thanks!

Have you tried placing a break point in that code and stepping through? If this will not work (some events are hard to debug), then do some logging in that code to see what's going on (or add wait window timeout 1 or use debugout commands).
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform