Hi

Good Day!

this is my code for update button. did not work as it should intended with.
insted of updating the current row of the date. it goe's like adding new row and data is added there.

thank you in advanced for all of youre help






Dim IQAMANo As Integer

If Me.cmbiqama.Value = "" Then

MsgBox "IQAMA No Can Not be Blank!!!", vbExclamation, "IQAMA No"



End If

IQAMANo = Me.cmbiqama.Value

Sheet3.Select

Dim rowselect As Integer

rowselect = Me.cmbiqama.Value

rowselect = rowselect + 1

Rows(rowselect).Select

Cells(rowselect, 2) = Me.Textempnum.Value

Cells(rowselect, 3) = Me.txtiqama.Value
Cells(rowselect, 4) = Me.txtemployeename

Cells(rowselect, 5) = Me.ComboBox1.Value
Cells(rowselect, 6) = Me.cmbxcountry.Value
Cells(rowselect, 7) = Me.ComboBox2.Value
Cells(rowselect, 7) = Me.textBASICSALARY.Value
Cells(rowselect, 9) = Me.textFOOD.Value
Cells(rowselect, 10) = Me.textTRANS.Value
Cells(rowselect, 11) = Me.textOTHERS.Value
Cells(rowselect, 8) = Me.textOVERTIME.Value
Cells(rowselect, 13) = Me.txtab.Value
Cells(rowselect, 14) = Me.txtlate.Value
Cells(rowselect, 15) = Me.txtloan.Value
Cells(rowselect, 16) = Me.txtpenalty.Value
Cells(rowselect, 17) = Me.lbldeduc.Caption
Cells(rowselect, 19) = Me.lblGROSSPAY.Caption
Cells(rowselect, 20) = Me.lblnetpay.Caption

Cells(rowselect, 23) = Me.txtemployer.Value
Cells(rowselect, 24) = Me.ComboBox2.Value