Results 1 to 10 of 10

Thread: RecordCount(resolved)

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2005
    Posts
    81

    Resolved RecordCount(resolved)

    hi,

    i always having problems in using RecordCount. It always give me -1 eventhough there are some records.

    below is part of my coding. i want to display the records in a MSFlexGrid. Before the display i check for the recordcount , if the record is > 15 , then the rows will +1. But i always getting the recordcount is -1 even there are many records. Can someone help me to solve this

    Private Sub fillDetails()

    MSFlexGrid1.Clear
    Dim row_counter As Integer
    row_counter = 1

    With MSFlexGrid1
    .FormatString = " No." & "|" & " Date" & "|" & " .............
    End With

    rs_f.Open "select * from FollowUp where EnqNo = " & Label1 & "", con, adOpenDynamic, adLockPessimistic


    If rs_f.RecordCount <> 0 Then
    G_RowCheck = rs_f.RecordCount
    If rs_f.RecordCount > 15 Then
    Me.MSFlexGrid1.Rows = rs_f.RecordCount + 1
    Else
    Me.MSFlexGrid1.Rows = 15
    End If
    Last edited by vivian2u; Apr 17th, 2005 at 11:18 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width