打印报告中数据字段中的用户可选颜色规范 [英] User selectable color spec in data fields on printed reports
问题描述
我有很多基本上是黑色的报告'
白色预备表格(图片为IRS表格1040)。
数据字段覆盖在
正确位置的报告字段中,我将授权用户
使用蓝色/红色/黑色 - 也许更多 - 作为文本框的forecolor
属性控制保存数据,以便
黑色&白色表格将以所需颜色显示所有打印数据
。
我在报告上设置了一个文本框控件(rptENF260),名为
DataColor。然后我尝试将单个数据字段文本框'
ForeColor属性设置为= Me!DataColor。嗯,那不行。
所以我尝试了= Forms!rptENF260!DataColor和
Forms!rptENF260!DataColor。 Access 97 HELP表示
任何评估为数值的表达式都可以使用
。我似乎无法找到一个有效的。
I have a number of reports that are essentially black ''n
white prepared forms (picture an IRS form 1040). The
data fields are overlaid onto the report fields in the
correct positions and I would to empower the user to
use blue/red/black - maybe more - as the forecolor
property for the textbox controls holding data so that
the black & white forms will have all the printed data
shown in the desired color.
I put a textbox control on the report (rptENF260) named
DataColor. Then I tried setting a single datafield textbox''s
ForeColor property to =Me!DataColor. Well, that didn''t work.
So I tried =Forms!rptENF260!DataColor and just
Forms!rptENF260!DataColor. Access 97 HELP says
any expression evaluating to a numeric value can be
used. I can''t seem to find one that works.
推荐答案
进一步测试证明我甚至无法将其放入ForeColor
属性设置:= 16711680 * 10/10。我确定这是一个数字
表达式。
Further testing proves that I cannot even put this into the ForeColor
property setting: =16711680*10/10. I''m sure that''s a numeric
expression.
我正在考虑设置所需的报告文本框字段' '
ForeSkin属性从代码中获得所需的值。我知道
很多打字但是我似乎无法绕过
属性设置框限制,只允许输入一个数字
来输入在ForeColor属性设置字段中。
是否有人愿意提供代码片段
仅列出指定报告上的那些文本框控件
ForeColor属性设置值16711680?
I am thinking of setting the desired report textbox fields''
ForeSkin property to desired value from within code. I know
its a lot of typing but I cannot seem to get around the
property settings box limitation allowing ONLY a number
to be typed in the ForeColor property setting field.
Would someone like to contribute a code snippet that
lists only those textbox controls on a report having specified
ForeColor property setting value of 16711680?
>有人愿意提供
仅列出那些文本框控件的代码段吗?在已指定
ForeColor属性设置值16711680的报告上?
lists only those textbox controls on a report having specified
ForeColor property setting value of 16711680?
好的,我会去看看...
Private Sub ListControlsBttn_Click()
''*************************** ********************** ************************
''目的:为用户指定的表单运行Controls集合。
''控件集合是一个表单'defau收藏。
''************************************* ************ ************************
On Error GoTo ListControlsBttn_ClickError
Dim ThisForm As String
ThisForm = Me.Name
Dim I As Integer,intHowmany As Integer,WhichRept As String
>
Msg ="输入报告名称。 ''设置提示。
标题="报告名称?" ''设置标题。
Defvalue =" rptENF260" ''设置默认回报
值。
WhichRept = InputBox
OK, I''ll have a go at it...
Private Sub ListControlsBttn_Click()
''************************************************* ************************
'' Purpose: Run the Controls Collection for user-specified form.
'' The controls collection is a form''s default collection.
''************************************************* ************************
On Error GoTo ListControlsBttn_ClickError
Dim ThisForm As String
ThisForm = Me.Name
Dim I As Integer, intHowmany As Integer, WhichRept As String
Msg = "Enter report name." '' Set prompt.
Title = "Report Name?" '' Set title.
Defvalue = "rptENF260" '' Set default return
value.
WhichRept = InputBox
这篇关于打印报告中数据字段中的用户可选颜色规范的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!