Hi Bernard..
Try to use INKEY() without the "H" parameter
>>Hi Bernard..
>>
>>Here is an example that works...
>>
>>DO WHILE
>> *-- Wait 0.5 second for a keypress
>> nWait = INKEY(0.5,"H")
>> IF nWait <> 0
>> *-- Key pressed, EXIT loop
>> EXIT
>> ENDIF
>>
>> Some code....
>>
>>ENDDO
>>
>
>My code is similar. The problem is that FPW2.6a comes up with this error when the INKEY() function itself is evaluated nWait = INKEY(0.5,"H")
>
>"Function argument value, type, or count is invalid" (ERROR#11)
>
>So there is no use evaluating the nWait variable to see if it is <> 0 as the program bombs at the line where there is INKEY(), before returning any result to nWait!!
>
>I want to know if this is a bug or not.
>
>Bernard
Benn Kjaer
MS Certified Professional - Visual Foxpro
"There is something rotten in the state of Denmark"
"Why make user-friendly programs, when there aren’t any friendly users :o)"