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

x
?
Solved

Error repopulating MSHFlexGrid

Posted on 2002-07-30
7
Medium Priority
?
479 Views
Last Modified: 2008-02-20
I have a form to allow users to select historical data from a table by any of several criteria using combo boxes. The grid loads fine at Form load, but when the selections are made, and I try to load it again with the recordset from the selection statement, I get the following error:

Run-time error '30023':
Unable to access data. DataSource settings may be incorrect, or the DataSource functionality may be limited.

I have tried declaring this recordset locally, and in the General section.  I am clearing the grid, before opening the recordset and before setting the DataSource value to the recordset.  I have verified that, when I reach the statement assigning the DataSource for the grid, that my sql SELECT statement is correct, that my recordset is open, and has the selected data.  

0
Comment
Question by:isrspgmr
[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
7 Comments
 
LVL 1

Expert Comment

by:knuckle05
ID: 7188824
Have you tried putting a data control on your form and connecting your grid to the data control? Then you could try refreshing the data control.

I'm not even sure if this is possible. Just an idea...
0
 

Author Comment

by:isrspgmr
ID: 7188855
Thank you for the suggestion.  Actually though, we have a company policy against using data controls. We try to stick to ADO objects.
0
 
LVL 1

Expert Comment

by:knuckle05
ID: 7188898
From what I've seen by looking around, it seems a lot of people have had this problem.

Try setting

MSHFlexGrid1.DataSource = Nothing

before you reset it.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:isrspgmr
ID: 7189045
Yes, thanks again, but I had actually seen that suggestion in previously asked questions before I posted this one.  I have tried that, before setting the datasource, I've tried it earlier on, before opening the recordset.  No difference.  In debugging the code though, even without trying to assign Nothing as the datasource, I can see that that is the value of the datasource property right before I execute the datasource assignment line that causes the error.
0
 
LVL 2

Accepted Solution

by:
mmcmillen earned 400 total points
ID: 7190487
I have seen a situation where checking the recordset for eof prior to the set grd.datasource = recordset caused problems.  

I did try this at home last night on my system and I had no problem. Here at work, I have the same problem.


0
 

Author Comment

by:isrspgmr
ID: 7190567
Excellent.  I was in fact testing for .EOF before the datasource assignment.  I have now tried closing the recordset after the .EOF test, and then reopening the recordset, and that has eliminated the error.  Thanks for the help.
0
 

Expert Comment

by:gotorx7
ID: 7359130
This fix worked for me also.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…
Suggested Courses

610 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