Go Premium for a chance to win a PS4. Enter to Win


REfreshing a datagrid attached to a command

Posted on 2002-07-09
Medium Priority
Last Modified: 2010-05-02
Here's the buig thing.

I want to attached dynamic filters to a datagrid.

As the user modifies those filters, I change the sql command of the command attached to the grid.

But the grid wont refresh...

How do I refresh it ???

I tried to execute the command, but i receive an error tellin me the object is open...
Question by:Audsimous
  • 5
  • 2
LVL 20

Expert Comment

ID: 7141517
If you are using the adodc1 then change the
adodc1.recordsource and then

Author Comment

ID: 7141544
not using an adodc object... directly attached to a dataenvironnement

Author Comment

ID: 7141559
not using an adodc object... directly attached to a dataenvironnement
Independent Software Vendors: 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 20

Accepted Solution

hes earned 120 total points
ID: 7141583

Author Comment

ID: 7141597
not using an adodc object... directly attached to a dataenvironnement

Author Comment

ID: 7141628
Still does'nt work... :

        If cboRegionMemo <> "Toutes" Then
            If Right(strCritere, 6) <> " WHERE" Then strCritere = strCritere & " AND "
            strCritere = strCritere & " region = '" & cboRegionMemo & "' "
        End If
        If Right(strCritere, 6) <> " WHERE" Then dataServices.Commands(2).CommandText = dataServices.Commands(2).CommandText & strCritere
        dataServices.Commands(2).CommandText = dataServices.Commands(2).CommandText & " ORDER BY interne"
        dgServices.DataMember = "cmdMemos"
        Set dgServices.DataSource = dataServices


Plz fix

Author Comment

ID: 7141698
Finally... thx!

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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

971 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