Solved

Grid not displaying all the records

Posted on 2002-04-02
9
198 Views
Last Modified: 2010-05-02
Hello,

I am using MSHFlexGrid to display some of my data from the database. Suppose I have 300 records in the recordset, the grid is displaying only 250 records. Is there any limitation on the No of records shown at one time for the MSHFlexGrid???? and How to overcome this problem????

Kirti
0
Comment
Question by:kirtirani
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
9 Comments
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 6914825
There is no limit of rows to display in a MSHFlexGrid Control. You codes may got some problem..
0
 

Author Comment

by:kirtirani
ID: 6914846
Hi ryancys,

My code is ----> this code is written at the form load event......

Msql = "Select * from HelpDesk_SJC where IsDeleted = 0 order by problemno desc"
Set madors = Help_Cls.RunSQLReturnRS(Msql)
If madors.RecordCount = 0 Then
    MsgBox "No record exists for the clinic"
    Exit Sub
End If
Set FlexGrid1.DataSource = madors
madors.MoveFirst
FillValue


where madors is ADO Recordset, Fillvalue is a function to fill the Text Boxes, and FlexGrid1 is the MSHFlexGrid.
When I run this code, the madors.RecordCount gives me 271 but Grid only displays abt 245 records. Can you please help me????

Kirti
0
 

Author Comment

by:kirtirani
ID: 6914874
Hi ryancys,

My code is ----> this code is written at the form load event......

Msql = "Select * from HelpDesk_SJC where IsDeleted = 0 order by problemno desc"
Set madors = Help_Cls.RunSQLReturnRS(Msql)
If madors.RecordCount = 0 Then
    MsgBox "No record exists for the clinic"
    Exit Sub
End If
Set FlexGrid1.DataSource = madors
madors.MoveFirst
FillValue


where madors is ADO Recordset, Fillvalue is a function to fill the Text Boxes, and FlexGrid1 is the MSHFlexGrid.
When I run this code, the madors.RecordCount gives me 271 but Grid only displays abt 245 records. Can you please help me????

Kirti
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6915388
Please maintain your open questions.  For the record:

Questions Asked 12
Last 10 Grades Given B B B A C C B  
Question Grading Record 7 Answers Graded / 7 Answers Received

Anthony
0
 

Author Comment

by:kirtirani
ID: 6941201
Can anyone please answer my question????
I need it urgently.
Kirti
0
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 6941214
If the database is small (zipped and < 1mb) and is Access , send me a copy with codes inside.

regards
0
 

Author Comment

by:kirtirani
ID: 6941275
Database is in Sqlserver. Code I have written earlier also. please see the code above and guide me.
Thanx
Kirti
0
 
LVL 52

Accepted Solution

by:
Ryan Chong earned 50 total points
ID: 6941285
Send the codes to ryancys78@yahoo.com, i will debug the code for you but try yourself first while waiting my reply.

regards
0
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 6943620
Hi kirtirani,

Tested on my system:

Option Explicit
Dim myADO As New ADODB.Recordset
Private Const iConnectionString As String = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=myDB"
Private myConn As New ADODB.Connection

Private Sub Command1_Click()
    myConn.ConnectionString = iConnectionString
    myConn.Open
    myADO.Open "Select * from ProductLines ", myConn, adOpenKeyset, adLockOptimistic
    Set MSHFlexGrid1.DataSource = myADO
    MSHFlexGrid1.Refresh
    MsgBox myADO.RecordCount
End Sub

Everything just fine > display more than 5k records. So, i suspend what is wrong is your SQL statement.

What is the SQL statement you using? Make sure it's correct.

regards
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question