按过滤器打印报告 [英] Print report by filter

查看:56
本文介绍了按过滤器打印报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在尝试根据我输入的

文本框中的ID号来打印报告,但它只是打印表中的所有记录:(


Dim stDocName As String

Dim strWhere as String


strWhere =" ; [ID] ="& Me。[txtOrderID]


stDocName =" rptLabelsWDM_single"

DoCmd.OpenReport stDocName,acNormal


txtOrderID.SetFocus


谢谢,


-


亲切的问候,

客户服务

PS为了让我们有效地回复您的电子邮件,请始终包含

原始邮件。谢谢。

Hi,

I am trying to get a report to print based on what ID number I type into a
text box, but it just prints all records in the table :(

Dim stDocName As String
Dim strWhere As String

strWhere = "[ID] = " & Me.[txtOrderID]

stDocName = "rptLabelsWDM_single"
DoCmd.OpenReport stDocName, acNormal

txtOrderID.SetFocus

Thank You,

--

Kind Regards,
Customer Services
P.S. For us to answer your emails efficiently, please always include the
original message. Thank you.

推荐答案

您正在构建过滤器,但从未在Open / b $ b $的开放事件中应用它您的报告


DoCmd.OpenReport stDocName,acNormal,strWhere

you are building your filter but never applying it in the Open event of
your report

DoCmd.OpenReport stDocName, acNormal, strWhere


您正在构建过滤器但从不应用在公开活动中你的报告

你的报告


DoCmd.OpenReport stDocName,acNormal,strWhere

you are building your filter but never applying it in the Open event of
your report

DoCmd.OpenReport stDocName, acNormal, strWhere


2005年8月3日星期三20:45:12 GMT,NJ写道:
On Wed, 03 Aug 2005 20:45:12 GMT, N J wrote:


我想得到一个报告打印根据我输入的文本框中的ID号,但它只打印表中的所有记录:(

Dim stDocName As String
Dim strWhere as String

strWhere =" [ID] =" &安培;我。[txtOrderID]

stDocName =" rptLabelsWDM_single"
DoCmd.OpenReport stDocName,acNormal

txtOrderID.SetFocus

谢谢,
Hi,

I am trying to get a report to print based on what ID number I type into a
text box, but it just prints all records in the table :(

Dim stDocName As String
Dim strWhere As String

strWhere = "[ID] = " & Me.[txtOrderID]

stDocName = "rptLabelsWDM_single"
DoCmd.OpenReport stDocName, acNormal

txtOrderID.SetFocus

Thank You,




strWhere是过滤记录的where子句,但是你永远不会将
添加到where子句参数位置。


DoCmd.OpenReport stDocName,acNormal ,, strWhere


-

Fred

请只回复此新闻组。

我不回复个人电子邮件。



strWhere is the where clause to filter the records, but you never
added it to the where clause argument position.

DoCmd.OpenReport stDocName, acNormal, ,strWhere

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.


这篇关于按过滤器打印报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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