Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Double clicking and Keypress Events on Grids
Message
From
23/07/2005 05:14:31
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01035051
Message ID:
01035356
Views:
15
Hi,

>>
I have a grid on a form which is bound to a cursor which is READONLY. In the doubleclick event and Keypress event I have the same code. The problem I have is if the Allcellselection peoperty is set to T both events do not work. If I have it set to F then the double click works but when I use the down arrow as soon as the record pointer moves the form/grid is released.

I basically want to carry out my code if the user presses enter on the record or double clicks. Any help would be appreciated.
IF nKeyCode = 13 AND lcsearch='Article'&& Enter key
SELECT testsum
replace artikey WITH mycursor.artikey, descrip1 WITH mycursor.descrip1, seamslippa WITH mycursor.seamslippa, ardelivery WITH mycursor.ardelivery, acomp WITH mycursor.acomp
ENDIF

IF nKeyCode = 13 AND lcsearch='Test Result'&& Enter key
	SELECT testsum
	SEEK UPPER(mycursor.labref)
ENDIF

THISFORM.Release()
thconsole.pageframe1.page2.refresh
>>
If you have this code in the Keypress event it's hardly suprising that the form is released. Or am I missing something ?
Regards,
Viv
Previous
Reply
Map
View

Click here to load this message in the networking platform