格式化表单中的图表 [英] Formatting Charts in a Form

查看:66
本文介绍了格式化表单中的图表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我有一个表单,可以为我创建一个图表,按月(x轴)显示出现次数(y轴)。从生成表中检索数据。创建图表时,它按字母顺序(4月至9月)绘制x轴上的月份。如何更改它以便正确订购月份(1月至12月)。


(在生产表中,数据从1月到12月正确列出)


谢谢!

Hello,

I have a form that creates a chart for me that displays the number of occurances (y-axis) by month (x-axis). The data is retrieved from a make-table. When the chart is created it plots the months on the x-axis in alphabetical order (Apr-Sep). How do I change it so it orders the months correctly (Jan-Dec).

(In the make-table, the data is listed properly from Jan to Dec)

Thanks!

推荐答案

将月份字符串转换为日期(同一年份全部 - 无论哪一个都没关系)然后按该值而不是字符串排序。


使用CDate()将字符串转换为日期。
Convert your month strings into dates (all for the same year - it doesn''t matter which one) then order by that value rather than the strings.

Use CDate() to convert from a string to a Date.



将月份字符串转换为日期(同一年份全部 - 无关紧要)然后按该值排序而不是字符串。


使用CDate()将字符串转换为Date。
Convert your month strings into dates (all for the same year - it doesn''t matter which one) then order by that value rather than the strings.

Use CDate() to convert from a string to a Date.



我认为这就是我正在进行的一轮谈判。我有一个月份([日期])字段,返回值1-12。该字段按升序排序,未显示。然后我有一个由连续的IIF组成的字段。将月份([DATE])转换为单词的语句。


Ex。 IIF(月([DATE])= 1,Jan,IIF(月([DATE])= 2,2月,....... IIF(月([DATE])= 12, Dec


当我运行make-table时,它会通过未显示的数字字段进行排序并显示文本字段。然后正确排序该表,但是当我将其发送到图表形式它按字母顺序排列文本月份。


I think that is what I am doing in a round about way. I have a field for Month([DATE]) which returns values 1-12. That field is ordered ascending and is not shown. Then I have a field consisting of successive "IIF" statements to convert the Month([DATE]) into words.

Ex. IIF(Month([DATE])=1, "Jan", IIF(Month([DATE])=2, "Feb",.......IIF(Month([DATE])=12, "Dec"

When I run the make-table it orders by the unshown numeric field and displays the text field. The table is then ordered correctly, but when I send it to the graph form it alphabetizes the text months.


当您将其发送到图表时,请确保它已经计算了月份数。


从数字月转换(假设它在变量intMonth中)时,只需使用:
When you "send it to the graph" ensure that it has the already calculated month number to work from.

When converting from a numeric month (Assume it is in variable intMonth) simply use :
展开 | 选择 | Wrap | 行号


这篇关于格式化表单中的图表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆