I have a table (Sales Order) that contains a field (SubberNo).
When user click a button on the Sales Order form, a dialog box appear.
Following is my coding (with the help of searchin in forum
).
window.OPEN ('Enter Sub Order No. #1#########\',
subNo);
EntryNo := 0;
NewEntryNo := 1;
WHILE (NewEntryNo > 0) AND (EntryNo <> NewEntryNo) DO BEGIN
EntryNo := NewEntryNo;
CASE EntryNo OF
1 : NewEntryNo := window.INPUT(1,subNo);
END;
END;
window.CLOSE;
IF NewEntryNo = 0 THEN
EXIT;
Now, what I wish to do is practically compare the subNo (input in dialog) to the data (SubberNo) in my table (Sales Order).
If it's the same, then I wish to exit. Otherwise, I want them to keep entering the input on the dialog till it is the same.
Any idea how to work about it? :?: [-o<
Thanks..
Answers
Just thought of sharing with you guys.. :P
i guess it does helps if u keep playing trial and error and never give up..!!
window.OPEN ('Enter Sub Order No. #1#########\');
EntryArry[1]:=1;
EntryArry[2]:=2;
EntryArry[3]:=3;
EntryArry[4]:=4;
i:=1;
window.INPUT(1,NewEntryNo);;
REPEAT
SLEEP(100);
window.UPDATE(1,EntryArry);
IF NewEntryNo = EntryArry THEN
BEGIN
ERROR('OK!');
END;
i:=i+1;
UNTIL i>5;
When dialog appear you input number,for example you input 3
and Click 'Enter Sub Order No.'
Remember must Click title 'Enter Sub Order No.' on dialog
You Can see error number
IF You Input 7
there is no error!!!!
window.OPEN ('Enter Sub Order No. #1#########\',
subNo);
EntryNo := 0;
NewEntryNo := 1;
WHILE (NewEntryNo > 0) AND (EntryNo <> NewEntryNo) DO BEGIN
EntryNo := NewEntryNo;
CASE EntryNo OF
1 :window.INPUT(1,subNo);
END;
END;
window.CLOSE;
IF NewEntryNo = 0 THEN
EXIT;
You can look my Example code!!
Thanks for your effort though.