Hi,
I have a form for user to input the customer code and then load their inventory lot record to the cursor.
I created a method to load the records from a file to the cursor and use in
the combobox control.
First or second time to call the method are no error, but sometime, randomly happend "Record is out of range" error when
run to the statement -> thisform.cboCusLotNo.ControlSource = "curCustLot.cuslotno"
Please advise.
Derek
IF USED('cusfile')
SELECT cusfile
USE
ENDIF
USE cusfile IN 0 ALIAS cusfile NOUPDATE
SELECT cusfile
SELECT * FROM cusfile INTO CURSOR curCustLot ORDER BY cusfile.cuslotno
SELECT curCustLot
thisform.cboCusLotNo.ControlSource = "curCustLot.cuslotno"
thisform.cboCusLotNo.RowSource = "curCustLot.cuslotno,itmcode,bal"
thisform.cboCusLotNo.ListIndex = 1
thisform.cboCusLotNo.Refresh()