|
-
Apr 16th, 2005, 06:45 AM
#1
Thread Starter
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|