Dear Sir,

Refers to VB 6.0

(a) I don't want the cursor appear on the sreen during form_load, so what is the coding should I put.

(b) Refers to the below coding.
While I click on the cmdUpdate button, the edited data cannot be updated. The run time error also not found. Do you know why???

Private Sub cmdUpdate_Click()
On Error GoTo errhandler

'Create SOL statement to Update data
gDB.Execute ("UPDATE Setting SET EPeriod = " & txtFields(1) & "," & _
"CurDes = '" & txtFields(2) & "', CurSign = '" & txtFields(3) & "'," & _
"Cent = '" & txtFields(4) & "', LastInv = " & txtFields(5) & "," & _
"LastDN = " & txtFields(6) & ", LastCN = " & txtFields(7) & "," & _
"LastRec = " & txtFields(8) & " WHERE SPeriod = " & txtFields(0) & ";")

txtFields(0).SetFocus
Exit Sub

errhandler:
Call MsgBox(Err.Description, vbOKOnly + vbExclamation)
End Sub

Private Sub Form_Load()
SQL = "SELECT * FROM Setting ORDER BY SPeriod"
Set RS = gDB.OpenRecordset(SQL)
Call GiveData
Call UnlockText
End Sub


Thanks,

Xiang