General information
Category:
Forms & Form designer
Hi Roi,
Still lost. If you could help me with this one I'll never ask again.
1. I used the modify command to create "CreateReportCursor"
2. In it I put the folling code.
LOCAL cGroupCode, cCompanyName, dStart, dEnd
WITH THISFORM
cGroupCode = .textbox1.VALUE
CcOMPANYnAME = .textbox2.VALUE
dStart = .text3.value
dend = textbox4.
ENDWITH
SELECT test.group_code, payment.ins_co_name, payment.fromdate, payment.todate;
FROM test, payment ;
WHERE test.group_code == cGroupCode ;
AND payment.ins_co_name == cCompanyName ;
AND payment.fromdate == dStart ;
AND payment.todate == dEnd ;
INTO Cursor ReportPreview
IF _TALLY != 0
cReturn = .T.
ELSE
cReturn = .F.
ENDIF
RETURN cReturn
3. I then opened the form search1.
4. I opened the add meathord option and added the meathord CreateReportCursor.
5. I the opened the command button of my search button and added the foling code to the click event option.
cResult = thisform.CreateReportCursor()
if cResult
wait window 'Cursor is there, do your preview'
else
wait window 'No records, notify the user'
endif
The problem is, no mater what I put in, it comes back with the wait window 'Cursor is there, do your preview' This happens even if theres no data entered.
Please Help
John
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only