Problem with BROWSE

alex10

New Member
I’m trying to use a BROWSE to edit, delete and add 4 fields in each record, but the browse only let me update the first one, I cannot navigate to the others fields. Thanks for all your help. Here is my code:

DEFINE QUERY det-query FOR gtd_dmstr SCROLLING.
DEFINE VARIABLE Method-Status AS LOGICAL.
DEFINE VARIABLE Current-Record AS ROWID.
DEFINE BROWSE det-browse QUERY det-query
DISPLAY gtd_rpart gtd_qty WIDTH 18
ENABLE gtd_qty gtd_rpart
WITH 3 DOWN
SEPARATORS.
DEFINE BUTTON btn-Add LABEL "Add".
DEFINE BUTTON btn-Delete LABEL "Delete".
DEFINE BUTTON btn-Exit LABEL "Exit".
DEFINE FRAME Frame1
btn-Add AT COLUMN 2 ROW 12 btn-Delete btn-Exit SKIP(1)
det-browse AT ROW 2 COLUMN 2
WITH SIDE-LABELS USE-TEXT CENTERED THREE-D
ROW 2 TITLE "Database Access Form for the Item Table" width 100.
ON CHOOSE OF btn-Add DO:
Method-Status = det-browse:INSERT-ROW("AFTER").
END.
ON ROW-LEAVE OF BROWSE det-browse DO:
IF det-browse:NEW-ROW IN FRAME Frame1 THEN DO:
CREATE gtd_dmstr.
ASSIGN gtd_ord = "00000001"
INPUT BROWSE det-browse gtd_qty gtd_rpart.
Method-Status = det-browse:CREATE-RESULT-LIST-ENTRY().
END.
END.
ON CHOOSE OF btn-Delete DO:
GET CURRENT det-query EXCLUSIVE-LOCK NO-WAIT.
DELETE gtd_dmstr.
Method-Status = det-browse:DELETE-SELECTED-ROWS().
END.
OPEN QUERY det-query FOR EACH gtd_dmstr NO-LOCK.
ENABLE ALL WITH FRAME Frame1.
WAIT-FOR CHOOSE OF btn-Exit.
CLOSE QUERY det-query.
 

MDaanje

New Member
Hello alex10,

CREATE gtd_dmstr.
ASSIGN gtd_ord = "00000001" --> is this a unique field
?? (stands for ordernumber?), maybe that's the problem?!

If this isn't the problem, please give some more info (field info) about the problem.
 
Top