Hi Tommy,
I got the same error message in this code MESSAGE#
1452217 and under VFP 9.0. I must use Sleep() instead INKEY().
But in your case...
MartinaJ
>Hi Gang!
>
>I am getting an error with the following line of code:
>
>IF INKEY() = 27
>
>The error is "Function argument value, type, or count is invalid" (Error 11)
>
>How can I be passing an invalid argument when I am not passing any argument at all? This error is sporadic and not one that I can consistantly reproduce. In fact, exiting the program, reopening it and the repeating the function usually works without error.
>
>
>LPARAMETERS lcFileName, llExitLoop2
>
>LOCAL llFileExists
>llFileExists = .F.
>ltStart = DATETIME()
>llExitLoop2 = .F.
>
>DO WHILE ((DATETIME() - ltStart) < 120) AND NOT llExitLoop2
>*TMT 10/24/08 put this message on the frmseod form.
>* WAIT WINDOW "Waiting for response from CentralWarehouse - " + STR((DATETIME() - ltStart),3,0) + " seconds elapsed." NOWAIT
> WAIT "Waiting for file - " + UPPER(ALLTRIM(lcFileName)) + " - " + ;
> STR( 120 - (DATETIME() - ltStart) ,3,0) + " seconds remaining." WINDOW NOWAIT
>
> IF FILE('c:\temp\' + lcFileName)
> llFileExists = .T.
> WAIT CLEAR
> EXIT
> ENDIF
> IF INKEY() = 27
> llExitLoop2 = .T.
> EXIT
> ENDIF
> DOEVENTS
>ENDDO
>
>IF NOT llFileExists AND NOT llExitLoop2
>*TMT 10/24/08 put this message on the frmseod form.
> WAIT "Customer Extract - No acknowlegment returned from EZDW - '" + ALLTRIM(lcFileName) + "'." WINDOW TIMEOUT 5
> DO centrack WITH "POSEZDW","Wait4EZDW", .F., 0, .T., .F., .F., "EZDW - No customer acknowledgment file returned - '" + ALLTRIM(lcFileName) + "'."
> RETURN .F.
>ELSE
> IF NOT llFileExists AND llExitLoop2
> RETURN .F.
> ENDIF
>ENDIF
>
>*TMT 08/05/08 Wait 1 second after the webservice has let go of the file before trying to open it with
>*the FOPEN below.... else we may get a "File Access is Denied" error
>ltStart = DATETIME()
>DO WHILE DATETIME() - ltStart < 1
>ENDDO
>*TMT
>RETURN .T.
>
>
>Any ideas??
>
>Thanks!