我可以在报告中读取文本框控件的值吗? [英] Can I read the value of a textbox control on a report?

查看:41
本文介绍了我可以在报告中读取文本框控件的值吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用A97。我已经习惯了从表格控件中读取值

表格,我已经非常依赖它了。我的习惯在报告中溢出了

。我不确定在OnFormat事件代码期间我是否可以在报表上的文本框控件中可靠地读取值



就像我在表单中这样做一样。


我有一份报告,我称之为402报告,上面是一个LaborCost

文本框。我使用这样的代码行


如果txtLaborCost> 0然后我!txtLaborCost.Visible = True


试图读取控件的值。我不确定我得到了什么,我期待的是b $ b。谁知道这个并且感觉很舒服

评论主题:Thx。

I use A97. I''ve gotten used to reading values from textbox controls
on forms, I''ve come to rely on it pretty heavily. My habit spills over
into reports. I''m uncertain whether I can reliably read the values
in textbox controls on reports during the OnFormat event code
the same way I''ve been doing so in forms.

I have a report I call the 402 report and on it is a LaborCost
textbox. I use a line of code something like this

If txtLaborCost > 0 Then Me!txtLaborCost.Visible = True

in an attempt to read the control''s value. I''m not sure I''m getting
what I expect. Who knows about this and feels comfortable
commenting about the topic: Thx.

推荐答案

因为报告是建立的 ;顺序,这一切都取决于

文本框所在的位置以及它的控制源是什么 - 假设我们在讨论报告中的代码时是b
。因此,根据你想要阅读它的时间和地点,这可能是不可靠的。


你可能会有更好的结果如果你读取该字段的值为

文本框绑定。

-


Ken Snell

< MS ACCESS MVP>


" MLH" < CR ** @ NorthState.net>在消息中写道

news:gn ******************************** @ 4ax.com ...
Because a report is "built" sequentially, it all depends upon where the
textbox is located and what its control source is -- assuming that we''re
talking about code within the report. So, it can be unreliable depending
upon when and where you''re trying to read it.

You''ll likely have better results if you read the value of the field to
which the textbox is bound.
--

Ken Snell
<MS ACCESS MVP>

"MLH" <CR**@NorthState.net> wrote in message
news:gn********************************@4ax.com...
我使用的是A97。我已经习惯了从表格上的文本框控件中读取值,我已经非常依赖它了。我的习惯在报告中溢出。我不确定我是否可以在OnFormat事件代码中可靠地读取报表上文本框控件中的值
,就像我在表单中这样做一样。
我有一份报告,我称之为402报告,并且它是一个LaborCost
文本框。我使用这样的代码行

如果txtLaborCost> 0然后我!txtLaborCost.Visible = True

试图读取控件的值。我不确定我会得到什么。谁知道这件事并且感觉很舒服
评论这个话题:Thx。
I use A97. I''ve gotten used to reading values from textbox controls
on forms, I''ve come to rely on it pretty heavily. My habit spills over
into reports. I''m uncertain whether I can reliably read the values
in textbox controls on reports during the OnFormat event code
the same way I''ve been doing so in forms.

I have a report I call the 402 report and on it is a LaborCost
textbox. I use a line of code something like this

If txtLaborCost > 0 Then Me!txtLaborCost.Visible = True

in an attempt to read the control''s value. I''m not sure I''m getting
what I expect. Who knows about this and feels comfortable
commenting about the topic: Thx.



2006年1月4日星期三18:55:16 -0500 ,Ken Snell

< kt *********** @ ncoomcastt.renaetl>写道:
On Wed, 4 Jan 2006 18:55:16 -0500, "Ken Snell"
<kt***********@ncoomcastt.renaetl> wrote:
因为报告是建立的,顺序,这完全取决于
文本框的位置及其控制源 - 假设我们正在讨论报告中的代码。因此,根据您在何时何地尝试阅读它,它可能是不可靠的。

如果您将字段的值读取到<,您可能会有更好的结果文本框绑定的文件。
Because a report is "built" sequentially, it all depends upon where the
textbox is located and what its control source is -- assuming that we''re
talking about code within the report. So, it can be unreliable depending
upon when and where you''re trying to read it.

You''ll likely have better results if you read the value of the field to
which the textbox is bound.



听起来像是对我的计划。我用什么语法来做到这一点?

显然,不是我!BlahBlahBlah。


Sounds like a plan to me. What syntax do I use to do exactly that?
Obviously, not Me!BlahBlahBlah.


BTW,我为我的系统日期设置道歉06年1月17日。现在我已经注意到它已经修正了


BTW, my apologies for my system date setting of 1/17/06. Have
corrected now that I''ve noticed it.


这篇关于我可以在报告中读取文本框控件的值吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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