Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Grid not displaying all the records

Posted on 2002-04-02
9
Medium Priority
?
200 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 53

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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 53

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 53

Accepted Solution

by:
Ryan Chong earned 200 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 53

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

Technology Partners: 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!

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…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

618 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