Bborel,
Since you used the term 'query', am I right in saying that you feel comfortable writing an SQL Select statement to produce a result set, which you can then use as the input to a report?
If so, your code should look something like this. (I'm assuming you have been able to create the report in the repot designer).
lnAcct = 'ABC100' && this is actual account number
SELECT * FROM AccountTable WHERE AccountTable.AccountNumber = lnAcct INTO CURSOR TempCursor
&& TempCursor is a cursor which will hold the result set
SELECT TempCursor && switch to the cursor's work area
REPORT FORM MyReport PREVIEW && do the report
You write this code in a PRG file (to create a PRG file, type MODIFY COMMAND in the command window). Then, save the PRG file, and run it by typing DO followed by the name of the PRG; do that in the command window.
The point that hyderzaman1 addressed was how to actually get the account number from the user. That was what the INPUTBOX() was for, although there are other ways of achieving the same goal.
Hope this helps.
Mike
Mike Lewis
Edinburgh, Scotland
My Visual Foxpro web site:
My Crystal Reports web site: