Solved

Grid not displaying all the records

Posted on 2002-04-02
9
193 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
  • 4
  • 4
9 Comments
 
LVL 49

Expert Comment

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

Author Comment

by:kirtirani
Comment Utility
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
Comment Utility
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
 
LVL 75

Expert Comment

by:Anthony Perkins
Comment Utility
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:kirtirani
Comment Utility
Can anyone please answer my question????
I need it urgently.
Kirti
0
 
LVL 49

Expert Comment

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

regards
0
 

Author Comment

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

Accepted Solution

by:
Ryan Chong earned 50 total points
Comment Utility
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 49

Expert Comment

by:Ryan Chong
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now