Im using VB6. On rowcolchange event of may datagrid, im using the Frame caption to get the selected data. The problem is when I select the data on the grid. Its not showing the absolute position, still the first record.
This is my code:
My recordset cursor location is Client-side cursor
cursor type = static
loc type = optimistic
What should i do? Please help me. Thanks.
This is my code:
Code:
Private Sub dgUser_RowColChange(LastRow As Variant, ByVal LastCol As Integer) Dim deUser As ADODB.Recordset AdvantageEnvironment.cmdUsers Set deUser = AdvantageEnvironment.rscmdUsers If deUser.RecordCount > 0 Then frdet.Caption = "Record " & deUser.AbsolutePosition & " of " & deUser.RecordCount If IsNull(deUser.Fields("username").Value) Then txtUserName.Text = "" Else txtUserName.Text = deUser.Fields("username").Value End If If IsNull(deUser.Fields("userpass").Value) Then txtPassword.Text = "" Else txtPassword.Text = deUser.Fields("userpass").Value End If If IsNull(deUser.Fields("fullname").Value) Then txtFullName.Text = "" Else txtFullName.Text = deUser.Fields("fullname").Value End If If IsNull(deUser.Fields("position").Value) Then txtPosition.Text = "" Else txtPosition.Text = deUser.Fields("position").Value End If If deUser.Fields("urg").Value = "True" Then CheckURG.Value = 1 Else CheckURG.Value = 0 End If If (deUser.Fields("cashier").Value = "True") Then CheckCASH.Value = 1 Else CheckCASH.Value = 0 End If If (deUser.Fields("services").Value = "True") Then CheckSERV.Value = 1 Else CheckSERV.Value = 0 End IF End Sub
cursor type = static
loc type = optimistic
What should i do? Please help me. Thanks.
Comment