Solved

REfreshing a datagrid attached to a command

Posted on 2002-07-09
7
132 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
  • 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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 …
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…
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…

920 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

18 Experts available now in Live!

Get 1:1 Help Now