There is a textbox named 'refno' for auto-numbering purpose.
I want to make this textbox visible and display next number when opening the form.
repum - table to store numbers which is next to the existing no in the same line.
rp_num is the name of field in the repum.dbf.
tnfjob - table to store the full details when saving the form.
jt_ref is the field for the "refno number" for each information.
Above coding seem not working well. The number is not able to run next no and display when opening this form.
Appreciate your kindest help.
Thanks
millbear
Just a Beginner! Need help badly.
I want to make this textbox visible and display next number when opening the form.
repum - table to store numbers which is next to the existing no in the same line.
rp_num is the name of field in the repum.dbf.
tnfjob - table to store the full details when saving the form.
jt_ref is the field for the "refno number" for each information.
Code:
if empty(thisform.refno.value)
select atnfjob
set order to tnfjobb
seek alltrim(str(arepnum.rp_num+1))
do while not eof() .and. jt_refno=alltrim(str(repnum.rp_num+1))
select arepnum
do while .not. rlock()
enddo
replace rp_num with rp_num + 1
unlock
flush
select atnfjob
skip
enddo
else
thisform.refno.value
endif
Above coding seem not working well. The number is not able to run next no and display when opening this form.
Appreciate your kindest help.
Thanks
millbear
Just a Beginner! Need help badly.