This content has been marked as final. Show 2 replies
Let me understand if this is what happens - you have a pop-list that shows loads of values, and the cursor is always at the last one rather than at the very first value. Is that correct? And you want the cursor to be on the first value in the pop-list? If so, then this is what you do. You have to fool the pop-list. You have to retreive the first value (that appears in the pop-list) from the database and place it in the field, and THEN fire the populate_list command. I have a field called PROJ_CODE and the following code in the WHEN-MOUSE-CLICK button for that field caters for this problem....
/* THIS CODE ENSURES THAT THAT WHEN THE USER GOES TO THE POP-LIST
THEN THE CURSOR IS ALWAYS ON THE VERY FIRST ITEM OF THE LIST
AND NOT ON THE LAST ROW */
CURSOR C1 IS
select b.pro_desc, a.proj_code
where proj_user = :blk_main.t_user
and a.closing_flag = 'N'
order by a.pro_desc;
fetch c1 into v_desc, v_code;
if :blk_detail.proj_code is null then
:blk_detail.proj_code := v_code;
Hope this helps...
thanks harry that is exactly my problem