New record start on the same field like previous record

doktordoktor Member Posts: 28
Hi,

Is it possible to create a code for executing following situation? By filling the Sales Line and using the arrow key DOWN set up the cursor in the field Type? I know the existing Property Next Control. But in my case I don´t know from which field I will use the functionality ( arrow key DOWN). I need it from the any field in the Sales Line.

Thanks for answer.

Comments

  • DatapacDatapac Member Posts: 97
    Try putting the following code in the Form - On Next Record trigger
    CurrForm.Type.ACTIVATE;
  • doktordoktor Member Posts: 28
    :( it doesn' t work correct. :( when I use the arrow key DOWN the TYPE field is active, but I see in subform only one record, although there are more records than one for this Purchase. And second problem is, that I can't to move to the MainForm Purchase, because TYPE fields is allready active.

    Any another idea...??? :)
  • pdjpdj Member Posts: 643
    With a few additions I made it work.
    Form - OnNextRecord(Steps : Integer) : Integer
    IF CurrForm.ACTIVE THEN
      CurrForm.Description.ACTIVATE;
    EXIT(NEXT(Steps));
    
    Still not perfect, but it works in most cases.
    Regards
    Peter
  • DatapacDatapac Member Posts: 97
    Sorry, wrong trigger #-o , try the line of code in the Form OnNewRecord trigger
  • doktordoktor Member Posts: 28
    Thanks Datapac, it works good. \:D/
Sign In or Register to comment.