Solved

REfreshing a datagrid attached to a command

Posted on 2002-07-09
7
139 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
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.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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

Suggested Solutions

Title # Comments Views Activity
VB 6.0 printer how to align 6 67
Determine Range to Select 5 53
Hide vba in gp 7 104
How to Add / Edit Windows Menu 4 68
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…

831 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