过滤表单(按记录)以打印预览或打印报告 [英] filter a form (by record) to print preview or print report

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

问题描述

你好,

我已经完成了教程,并进行了搜索。我仍然无法找到解决问题的明确方法。


我有一个带有子窗体的表单,显示一个名为''theOrderID''的列表框控件。

我已将其设置(高度4),以便列出一长串已保存。订单显示在表格上。导航工作,所以一个人可以滚动过去的订单列表。

我正试图为客户设置一个按日期搜索的方法。 (过滤过去的订单)并预览所选的订单,最后打印。


我已经为列表框找到了代码。按日期排序的过滤器与一个名为过滤器(今天,本周,上周等)的价值表和一个宏一起计算出来。

我遇到的困难最大预览和打印。


主窗体必须查询发票;显示3个字段(在valuelist中),Customer Name,OrderID和OrderDate。


我有一个调用子例程的预览按钮Preview_Click ---

Hello,
I''ve gone through the tutorials, and searched. Still I can''t find a clear solution to my issue.

I have a form with a subform that displays a listbox control called ''theOrderID''.
I have set it up (height 4") so that a long list of "saved" orders displays on the Form. The navigation works, so a person can scroll through the list of past orders.
I''m attempting to set up a way for the customer to search by date. (filter the past orders) and also to preview the order selected, and finally print.

I''ve got the code worked out for the listbox. The filter by date sort of worked out with a valuelist called ''filter'' (today, this week, lastweek, etc.) and a macro.
I''m having the most difficulty with the preview and print.

The main form is bound to query "Invoices"; shows 3 fields (in valuelist), Customer Name, OrderID and OrderDate.

I have a Preview Button that calls a subroutine "Preview_Click---

展开 | 选择 | Wrap | 行号

推荐答案


您好,

我''我们完成了教程,并进行了搜索。我仍然无法找到解决问题的明确方法。


我有一个带有子窗体的表单,显示一个名为''theOrderID''的列表框控件。

我已将其设置(高度4),以便列出一长串已保存。订单显示在表格上。导航工作,所以一个人可以滚动过去的订单列表。

我正试图为客户设置一个按日期搜索的方法。 (过滤过去的订单)并预览所选的订单,最后打印。


我已经为列表框找到了代码。按日期排序的过滤器与一个名为过滤器(今天,本周,上周等)的价值表和一个宏一起计算出来。

我遇到的困难最大预览和打印。


主窗体必须查询发票;显示3个字段(在valuelist中),Customer Name,OrderID和OrderDate。


我有一个调用子例程的预览按钮Preview_Click ---
Hello,
I''ve gone through the tutorials, and searched. Still I can''t find a clear solution to my issue.

I have a form with a subform that displays a listbox control called ''theOrderID''.
I have set it up (height 4") so that a long list of "saved" orders displays on the Form. The navigation works, so a person can scroll through the list of past orders.
I''m attempting to set up a way for the customer to search by date. (filter the past orders) and also to preview the order selected, and finally print.

I''ve got the code worked out for the listbox. The filter by date sort of worked out with a valuelist called ''filter'' (today, this week, lastweek, etc.) and a macro.
I''m having the most difficulty with the preview and print.

The main form is bound to query "Invoices"; shows 3 fields (in valuelist), Customer Name, OrderID and OrderDate.

I have a Preview Button that calls a subroutine "Preview_Click---
展开 | 选择 | Wrap | 行号



------------------- ----------------------------------------------


试试这个:


strLinkCriteria =" OrderID =" &安培; Me.OrderID


而不是


strLinkCriteria =" OrderID =" &安培; OrderID
-----------------------------------------------------------------

Try this:

strLinkCriteria = "OrderID = " & Me.OrderID

instead of

strLinkCriteria = "OrderID = " & OrderID



你好Kcachaler,


我想这可能是我尝试过的,但我可能错了......我会试一试。非常感谢。

Rosie

Hello Kcachaler,

I think that may be one I did try, but I may be wrong....so I''ll give it a try. thanks so much.
Rosie



Hello Kcachaler,


我认为这可能是我尝试过的,但我可能错了......所以我会试一试。非常感谢。

Rosie
Hello Kcachaler,

I think that may be one I did try, but I may be wrong....so I''ll give it a try. thanks so much.
Rosie



您可能需要对If IsNull()行做同样的事情......即将它引用到Me.OrderID而不仅仅是OrderID(除非OrderID是你在别处声明的变量,只是在这里引用?)


问候,

Scott

You''ll likely need to do the same thing to your If IsNull() line... i.e. reference it to Me.OrderID instead of just OrderID (unless OrderID is a variable that you have declared elsewhere and are simply referencing here?)

Regards,
Scott


这篇关于过滤表单(按记录)以打印预览或打印报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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