Hello All,
I have a problem in that if i have a range of Itemcodes from "1000 to 9000" for example.
Now on a form say a user enters "1170" in a text box.I want to be able to collect all Itemcodes that have "11" as the start of the code.So these would be "1110,1120,1135,1148" etc and it must then populate the relevant fields.
Can this be done?
Here is an attempt by me
IF ItemCode <> '' THEN BEGIN //ItemCode is the source expr'sion of TB
NewItemCode:= ItemCode;
INIT;
NewItemCode:=DELSTR(ItemCode,3,2);
//sam:= STRPOS(ItemCode,NewItemCode); found this by using f1
// Item.SETFILTER("No.",'<=%1',ItemCode); this evrything below 1170
IF Item.FIND('-') THEN
REPEAT
IF FirstPos=SecondPos THEN BEGIN
"Table Entry No.":=NextEntryNo;
"Item No.":=Item."No.";
"Old price":=Item."Unit Cost";
Item.CALCFIELDS(Inventory);
Quantity := Item.Inventory ;
"Person Amending" := USERID;
INSERT;
NextEntryNo:= NextEntryNo +1;
END;
UNTIL Item.NEXT=0;
END;
thanks for the help
Regards
Five :?
Compile and then Recompile ....
0
Comments
Then You could filter on this, nice and easy...Maybe using the field "Statistics Group" or a new field...?[/quote]
Henrik Frederiksen, Denmark
Thanks for the idea.But will the user be able to see this on the form he is interacting with?
The idea is that the user enters the itemcode and all products that begin with this code appear in the grid below.
Will try what you say ....but still not sure
cheers
Five
Henrik Frederiksen, Denmark