OBJECT Form 55667 NoSeriesRenew { OBJECT-PROPERTIES { Date=04/01/10; Time=16.30.48; Modified=Yes; Version List=Utility; } PROPERTIES { Width=17710; Height=16060; MaximizedOnOpen=Yes; SourceTable=Table309; SourceTableTemporary=Yes; OnOpenForm=BEGIN TBNoserLine.SETCURRENTKEY("Series Code","Starting Date","Starting No."); TBNoserLine.FINDSET; REPEAT TBNoserLineCheck.SETRANGE("Series Code",TBNoserLine."Series Code"); TBNoserLineCheck.FINDLAST; Rec := TBNoserLineCheck; IF Rec.INSERT THEN; UNTIL TBNoserLine.NEXT = 0; TBNoserLineTemp.DELETEALL; Rec.FINDSET; REPEAT TBNoserLineTemp := Rec; TBNoserLineTemp.INSERT; UNTIL Rec.NEXT = 0; END; OnCloseForm=BEGIN Rec.RESET; TBNoserLineTemp.RESET; IF Rec.FINDSET THEN BEGIN REPEAT IF NOT TBNoserLineTemp.GET("Series Code","Line No.") THEN BEGIN TBNoserLine := Rec; TBNoserLine.INSERT; END; UNTIL Rec.NEXT = 0; END; END; } CONTROLS { { 1130000;TableBox ;110 ;110 ;17600;15950;HorzGlue=Both; VertGlue=Both } { 1130001;TextBox ;159 ;3520 ;1700 ;440 ;ParentControl=1130000; InColumn=Yes; SourceExpr="Series Code"; OnValidate=BEGIN Rec.SETRANGE("Series Code","Series Code"); Rec.FINDLAST; Rec.SETRANGE("Series Code"); Rec."Starting Date" := CALCDATE('<1Y>',Rec."Starting Date"); Rec."Line No." := Rec."Line No." + 10000; Rec."Warning No." := ''; Rec."Ending No." := ''; Rec."Last Date Used" := 0D; Rec."Last No. Used" := ''; END; } { 1130002;Label ;0 ;0 ;0 ;0 ;ParentControl=1130001; InColumnHeading=Yes } { 1130003;TextBox ;1859 ;3520 ;1700 ;440 ;Editable=No; ParentControl=1130000; InColumn=Yes; SourceExpr="Line No." } { 1130004;Label ;0 ;0 ;0 ;0 ;ParentControl=1130003; InColumnHeading=Yes } { 1130005;TextBox ;3559 ;3520 ;1700 ;440 ;ParentControl=1130000; InColumn=Yes; SourceExpr="Starting Date" } { 1130006;Label ;0 ;0 ;0 ;0 ;ParentControl=1130005; InColumnHeading=Yes } { 1130007;TextBox ;5259 ;3520 ;1693 ;440 ;ParentControl=1130000; InColumn=Yes; SourceExpr="Starting No." } { 1130008;Label ;0 ;0 ;0 ;0 ;ParentControl=1130007; InColumnHeading=Yes } { 1130009;TextBox ;6959 ;3520 ;1700 ;440 ;ParentControl=1130000; InColumn=Yes; SourceExpr="Ending No." } { 1130010;Label ;0 ;0 ;0 ;0 ;ParentControl=1130009; InColumnHeading=Yes } { 1130011;TextBox ;8659 ;3520 ;1700 ;440 ;ParentControl=1130000; InColumn=Yes; SourceExpr="Warning No." } { 1130012;Label ;0 ;0 ;0 ;0 ;ParentControl=1130011; InColumnHeading=Yes } { 1130013;TextBox ;10359;3520 ;1700 ;440 ;ParentControl=1130000; InColumn=Yes; SourceExpr="Increment-by No." } { 1130014;Label ;0 ;0 ;0 ;0 ;ParentControl=1130013; InColumnHeading=Yes } { 1130015;TextBox ;12059;3520 ;1700 ;440 ;ParentControl=1130000; InColumn=Yes; SourceExpr="Last No. Used" } { 1130016;Label ;0 ;0 ;0 ;0 ;ParentControl=1130015; InColumnHeading=Yes } { 1130017;CheckBox ;13759;3520 ;1700 ;440 ;ParentControl=1130000; InColumn=Yes; ShowCaption=No; SourceExpr=Open } { 1130018;Label ;0 ;0 ;0 ;0 ;ParentControl=1130017; InColumnHeading=Yes } { 1130019;TextBox ;15459;3520 ;1700 ;440 ;ParentControl=1130000; InColumn=Yes; SourceExpr="Last Date Used" } { 1130020;Label ;0 ;0 ;0 ;0 ;ParentControl=1130019; InColumnHeading=Yes } } CODE { VAR TBNoserLine@1130001 : Record 309; TBNoserLineCheck@1130002 : Record 309; TBNoserLineTemp@1130003 : TEMPORARY Record 309; BEGIN END. } }The form will show the last no. series line for each series code, and it allows you to insert new lines: just insert a new line in the form with f3 and copy the value of the series code with F8: the line no. is automatically incremented by 10000 and the starting date is automatically incremented by 1 year. You just have to adjust the starting no. on the line.
Comments
Happy new year!
When you want to make some more difficult things just tell me... :roll:
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
You can get this? well..
I want to show a DB Explosion with multiple levels.
When you click on an item, it should explode the level below. So you can have all the DB tree in one shot.
Is it possible?
I hope to read your topic soon
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
](*,)
Maybe it's better for you to back on your... No. Series Renewing tests!
bye bye!
P.S.: you should be more kind with people that try to help you; don't provoke me further, i won't answer
P.P.S.: did you read the title of the section? "Tips&Tricks": this means that it is the place to post already solved problems that can be helpful for others. If you don't like my code, don't use it (did you even try to import the form?)
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Ahah I misunderstood the "t"! I thought u were in god mode!
Hi belias. strange nick