Solved

REfreshing a datagrid attached to a command

Posted on 2002-07-09
7
147 Views
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...
0
Comment
Question by:Audsimous
[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
  • 5
  • 2
7 Comments
 
LVL 20

Expert Comment

by:hes
ID: 7141517
If you are using the adodc1 then change the
adodc1.recordsource and then
Adodc1.Refresh
0
 

Author Comment

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

Author Comment

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

Accepted Solution

by:
hes earned 40 total points
ID: 7141583
0
 

Author Comment

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

Author Comment

by:Audsimous
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
       
        'REfresh
        dataServices.Commands(2).CommandText = dataServices.Commands(2).CommandText & " ORDER BY interne"
        dgServices.DataMember = "cmdMemos"
        dataServices.rscmdMemos.Requery
        Set dgServices.DataSource = dataServices


--------------------------

Plz fix
0
 

Author Comment

by:Audsimous
ID: 7141698
Finally... thx!
0

Featured Post

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.

Question has a verified solution.

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

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…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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
Course of the Month8 days, 7 hours left to enroll

615 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