473,769 Members | 2,348 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Apply filter on Chart

25 New Member
Hi,

i create a chart in ms access based on my query, then i want my chart when is it open is only show value based on my criteria.

i'll try to used it in the properties apply filter using the expression, it didn't work. the chart still viewing all data.
and i used the event "on open" and used "applyfilte r" command
then it shown an error.

"that the report isn't bound with the query"

yes, i check it on the properties there are no query that bound to the chart.
so, how can i apply filter for my chart?

thank you.
May 1 '09 #1
10 15196
NeoPa
32,573 Recognized Expert Moderator MVP
Hi.

That's not very clear I'm afraid. Perhaps it might help if you posted the code you use to create your chart. Is the chart an object on a report?
May 1 '09 #2
dbdb
25 New Member
my chart is on the report.
i build it using chart wizrd in the report.

there are no code.
May 1 '09 #3
NeoPa
32,573 Recognized Expert Moderator MVP
You don't start your report with any code? You're sure?

How about the design of the report then? There must be a Record Source.

What's the chart built on data-wise?

I can't work with absolutely no information. A crumb or two is a bare minimum.
May 1 '09 #4
dbdb
25 New Member
mm so do i confused when i found no record source on it.
here is the story.

first, i run the report wizard then i choosed to build a chart based on a query.
then the wizard done, and my chart shown on the monitor.

then i want to view the report only the data that i want, but i don't want to use any criteria expression on my query, i want to apply filter on my report chart.
May 1 '09 #5
NeoPa
32,573 Recognized Expert Moderator MVP
@dbdb
What is the query the chart is built upon then? I need to see the SQL of it (rather than the name).
@dbdb
You may need to provide the SQL for the report too.

You should also explain how you, as a user of the database, cause the report to run. Do you run it directly from the Database window?
May 1 '09 #6
ADezii
8,834 Recognized Expert Expert
I agree with NeoPa in that you are giving us very little to work with, but first let's straighten out a few points:
  1. I'm making the assumption that the Report does not have a Record Source.
  2. The Chart, actually the Object Frame containing the Chart, does have a Row Source which will populate it.
  3. You can Open the Report in Design View (Hidden), modify the Row Source of the Object Frame containing the Chart, then re-open it, as in:
    Expand|Select|Wrap|Line Numbers
    1. DoCmd.OpenReport "Report1", acViewDesign, , , acHidden
    2. Reports!Report1![OLEUnbound0].RowSource = "TRANSFORM Sum(tblChart.Quantity) AS SumOfQuantity " & _
    3.                                           "SELECT tblChart.Fruit FROM tblChart WHERE " & _
    4.                                           "tblChart.Month='April'GROUP BY tblChart.Fruit PIVOT tblChart.Month;"
    5. DoCmd.OpenReport "Report1", acViewPreview
  4. Any questions, feel free to ask.
May 1 '09 #7
dbdb
25 New Member
mmm finnaly....
sorry guys, sometimes we never realize a small miss perception we get.
yes i found the recordsource.

yesterday i always getting confused to find where is the record source in the report properties.
but then today, i realize that the recourdsource is place in the chart properties.

OMG...
sorry for this litlle mistake.
then i can view my chart based on the data that i want.

thank you for your help....

nice to joining in this group.
May 4 '09 #8
NeoPa
32,573 Recognized Expert Moderator MVP
It's nice to have you.

I should add one thing that may prove helpful.

Normally, Access objects have a property, separate from the RecordSource property, that enables you to specify some form of filtering.

This allows you to separate the filtering from the basic fundamentals of the data. This is often helpful and simplifies matters. Especially when working in code.

To keep things simple, I suggest you look for, and work with, this property instead of changing the Record Source all the time.

I'm afraid I don't know what the details are for Chart objects, but a quick look through the properties should do it for you.

There is also a way of passing this as a parameter when opening objects in code for forms and reports. See if there is anything available for charts.
May 5 '09 #9
ADezii
8,834 Recognized Expert Expert
@NeoPa
Hello NeoPa, a Chart in Access is an Embedded/Linked OLE Object with the OLE Server being Microsoft Graph. This being said, I do not think that you can 'Filter' it in the traditional sense of the word, but I could be wrong. What you can do is specify Criteria in the underlying SQL, via the Query Grid, by dropping the Field into the Grid, set the Total Row = Where, then specifying your criteria.
May 5 '09 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1391
by: MaryD | last post by:
Is there any way to use the enter key - or a function key - as the Apply Filter when a form is opened in FilterByForm mode? I can see the value of function keys and the enter key when the form is open in Normal mode using the key down event but this does not work when the form is opened in filterbyform mode. Thank you for you help, MaryD
4
2610
by: Iyhamid | last post by:
Hi I am looking for codes to filter and apply filter to my data base using access
3
16956
by: mattscho | last post by:
Hi All, Trying to create a set of 3 buttons in a form that have the same effect as the "Filter by Form", "Apply Filter" and "Remove Filter" Buttons on the access toolbar. Help would be muchly appreciated. Cheers.
1
6059
by: mattscho | last post by:
Re: Filter By From, Apply Filter, Remove Filter Buttons in a Form. -------------------------------------------------------------------------------- Hi All, Trying to create a set of 3 buttons in a form that have the same effect as the "Filter by Form", "Apply Filter" and "Remove Filter" Buttons on the access toolbar. Help would be muchly appreciated. Cheers. In the Click() Event of 3 Command Buttons, place the following code: Code: (...
2
11258
by: Nhoung Ar | last post by:
Can anybody out there help me please on apply filter in MS Access. I have a form that create from the query, which contain field chidid (text field), in the form footer, I add the button to open another form (searchF form), which have an unbound text box (text1). It works fine with this code: DoCmd.ApplyFilter , "childid='" & Form_SearchF.Text1 & "'" But if I change the data type of childid field to number it does't work. The error...
3
10957
by: Supermansteel | last post by:
I am trying to run a Apply filter for everytime someone opens Form_CC it will only show the Test (Test_ID) they are working on. This seems to be the closest I have gotten to filtering it correctly, however it doesn't work when the form is opened. Is there something I am doing wrong on this? Private Sub Form_Open(Cancel As Integer) DoCmd.ApplyFilter Form_CC.Form.filter = "Test_ID = 28" Form_CC.Form.FilterOn = True End Sub
1
3143
by: eHaak | last post by:
A couple years ago, I built a database in MS Access 2003. I built the form using macros in some of the command buttons, and now I’m trying to eliminate the macros and just use visual basic code. I’ve been successful in doing this for most of the buttons, but I’m having trouble reprogramming some Apply Filter buttons on one form and could use some help. So I have a Contacts List form that lists all of the division’s staff members...
3
2690
by: dbdb | last post by:
hi guys need your suggestion how can i apply filter for my date variable data type i have a form name transaction and i have a text box on it named : start and finish i need to apply filter my data using that 2 data. i have to view data for the transaction date between start and finish date.
7
5525
AccessIdiot
by: AccessIdiot | last post by:
This seems like it should be really easy and I think I'm just missing something really dumb. I have a form that filters a report. At the top of the report I have a bunch of unbound text boxes that do simple things like count and sum. When I apply the filter to the report the text boxes update beautifully when their control source is something like =sum() However now I want to apply a clause. If I do this: =dcount("", "",">0") then I get...
0
9586
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10210
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9990
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7406
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5446
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3956
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.