Solved

REfreshing a datagrid attached to a command

Posted on 2002-07-09
7
129 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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…

707 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

13 Experts available now in Live!

Get 1:1 Help Now