473,814 Members | 3,390 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access Chart tool Doubt

47 New Member
I have developed a line chart inside a report to display some data, it takes data from a query that has a WHERE parameter to define date I want to view, I Žd like to set this date parameter not filling the parameter pop up but from a form text box with the date picker, I have used this method for several reports using the WHERE clause and it worked but since the report containig the chart doesn't have any data but the chart, I dont know how to handle it,
are there somebody have dealed with this

Thanks in advance for your help

R Walle
Jan 13 '10 #1
5 2404
nico5038
3,080 Recognized Expert Specialist
Just create a (dummy) table with one row and bind the report to that table.

Nic;o)
Jan 13 '10 #2
rwalle
47 New Member
Nico TKS for your response,
actually the report containing the chart works, it opens but since I take off the WHERE parameter in the query design view the chart display all the data without filtering, IŽd like to use a text field on a form with the date picker so the DB user can pick a date and then clicking a button run a macro with a WHERE clause based on the form date picker value, that opens the chart report and shows only data limited by the WHERE clause
Jan 13 '10 #3
TheSmileyCoder
2,322 Recognized Expert Moderator Top Contributor
You can dynamically set the SQL of the chart using VBA code. Whether its possible by using standards macro's I have no clue.

Expand|Select|Wrap|Line Numbers
  1. ctrlChart.RowSource = strSQL
Thats for a chart in the control named ctrlChart, where strSQL is a string containing the SQL statement.

What I did when I started trying to dynamically manipulate charts in Access reports was to open up a similar graph chart in excel, start the macro recorder, record my changes (Like setting X-axes or line width), end the recorder, and look at the code. Its not always 100% copy-pastable into Access but its a quite descent starting point.
Jan 13 '10 #4
nico5038
3,080 Recognized Expert Specialist
IŽd like to use a text field on a form with the date picker so the DB user can pick a date
An alternative is to use the form field in the query's WHERE clause.
This will look like: Forms("formname ")!fieldnam e

Personally I often use a user defined public variable and a function like:
Expand|Select|Wrap|Line Numbers
  1. Public dtChart as date
  2.  
  3. Function fncChartDate()
  4.    fncChartDate = dtChart
  5. END Function
  6.  
Now you can fill the date when the button is pressed with:
dtChart = Me.Chartdate
and use in the query for the WHERE clause just the function like:
Expand|Select|Wrap|Line Numbers
  1. select * from tblX where ChartDate = fncChartDate()
  2.  
Nic;o)
Jan 13 '10 #5
rwalle
47 New Member
Tks All for your quickly response,
Happily, I can say it worked, I used the Nico sugestion and change the [<parameter>] for [forms]![<SearchForm>]![<DateField>] in the SQL WHERE clause and it worked
my problem was that I tried to made this changes in the chart data properties and at the end I realized I had a query where the chart's report is tied to so I set this WHERE condition on that query and now is working

Tks again and see next doubt

Raymundo Walle
Jan 14 '10 #6

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

Similar topics

10
3539
by: Andrea M. Segovia | last post by:
Hello, I am a newbie to Oracle databases.... We have a visualization front-end tool connected to an Oracle back-end database on a Tru64 UNIX server. We also have clients with MS access databases who would like to share their data using this visualization tool but do not want to import their data into the Oracle server back-end.
0
1346
by: Jacky11 | last post by:
By default when you enable the data label in a 3-D Bar Chart, the data label starts in the middle of the bar chart. There is no Label Position option for a 3-D Chart, like nay other chart type. I would like to have the label at the "Outside End Position". Does any one know of any fix, or of any Addin tool? I found a wonderful addin that works only with Excel.
49
14366
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The application is relatively big: around 200 tables, 200 forms and sub-forms, 150 queries and 150 repports, 5GB of data (SQL Server 2000), 40 users. I'm wondering what are the disadvantages of using Access as front-end? Other that it's not...
3
3440
by: StBond | last post by:
Hi everyone, I am new to Access and Visual Basic so things my be getting across a bit cloudy. I only started using VB for one week. I am having a little problem with the database that I am working on. I am working with MS Access 2002. And I am having a problem with one of my charts. I will explain how everything is laid out then go into details.
0
2080
by: spm_no | last post by:
Hi, I am using Access 2002 and am creating a scatter-chart on a form in which the X-axis is a date. I can format and display the x-axis properly as a date. However, when I close and reopen Access, the data are incorrectly plotted with an x-axis that begins with a date of 1900. Only by toggling from the option "chart by column" to "chart by row" and then back to "chart by column", can I get the correct date on the x-axis. The problem...
1
1537
by: larry mckay | last post by:
is there a chart component or chart tool with .net that I can use to create bar graphs, pie charts, or other kinds of charts? does anyone have any sample code on how to print the created chart to paper? thanks *** Sent via Developersdex http://www.developersdex.com ***
37
5273
by: jasmith | last post by:
How will Access fair in a year? Two years? .... The new version of Access seems to service non programmers as a wizard interface to quickly create databases via a fancy wizard. Furthermore, why would you even continue to use Access as a backend when you have a much superior option in SQL express? What about as a future front-end development tool? Let's get serious. Microsoft continues to publish numerous articles and videos on how you...
4
9528
by: KPOJonesECC | last post by:
Hello, I am in the middle of an access database projet but are struggerling with a couple of things. I dont expect anyone to solve the problem for me, but would really appreciate a pointer in the right direction as I am starting to struggle in terms of direction on this. Problem no1: I am currently trying to build an interactive calculator in a access form. Im making ok progress but have a couple of things I cant work out how to...
1
6637
by: Wedgewood | last post by:
Group, I am trying to build a gantt chart in a MS Access for but I can't seem to get it to pick up the second data series. In excel, you create a stacked bar chart using fields "Key Date" and "Durration". Once the chart plots you "hide" the "Key Date" field. In Access I can create a bar chart and then goto "Chart Type" and change the chart from bar to stacked bar. That's where it gets stuck because it will only include one data...
0
10670
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...
0
10408
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10142
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
7686
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
6897
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5708
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3886
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3030
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.