从查询/记录集打印。 [英] Printing from a query / recordset.

查看:126
本文介绍了从查询/记录集打印。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个查询,我通过表单查看。由于标签向导打印到点阵打印机时出现问题,因此在单击命令按钮时,我会有一些代码用于打印单个标签。这很好。


但是我想将查询中的所有记录打印到连续标签上。


以下是此功能的代码,但它不起作用(惊喜,惊喜)。我可能不需要代码中的表单,因为它正在查看查询。有人可以给我一些建议吗?非常感谢。

展开 | 选择 | Wrap | 行号

解决方案


我有一个查询,我通过表单查看。由于标签向导打印到点阵打印机时出现问题,因此在单击命令按钮时,我会有一些代码用于打印单个标签。这很好。


但是我想将查询中的所有记录打印到连续标签上。


以下是此功能的代码,但它不起作用(惊喜,惊喜)。我可能不需要代码中的表单,因为它正在查看查询。有人可以给我一些建议吗?非常感谢。

展开 | 选择 | Wrap | 行号



嗨。


运算符集用于设置对象变量的引用。对于声明为字符串的变量,它肯定不起作用。 (代码行9-14)

什么是Close(代码行30)应该关闭?



那个收盘就是错误的外观。我删除了它,并将字符串更改为variant。当我运行它时,它说需要对象。


这里是代码现在的样子:

展开 | 选择 | Wrap | 行号



它的外观错误就在那里。我删除了它,并将字符串更改为variant。当我运行它时,它说需要对象。


这里是代码现在的样子:

展开 | 选择 | Wrap | 行号

I have a query which I view through a form. Due to problems with the label wizard printing to a dot-matrix printer I have some code to print out a single label when a command button is clicked. This works fine.

However I would like to print all the records from the query on to consecutive labels.

Below is the code for this function but it doesn''t work (surprise, surprise). I probably don''t need the form in the code as it is looking at the query. Can someone give me some advice please? Many thanks.

Expand|Select|Wrap|Line Numbers

解决方案

I have a query which I view through a form. Due to problems with the label wizard printing to a dot-matrix printer I have some code to print out a single label when a command button is clicked. This works fine.

However I would like to print all the records from the query on to consecutive labels.

Below is the code for this function but it doesn''t work (surprise, surprise). I probably don''t need the form in the code as it is looking at the query. Can someone give me some advice please? Many thanks.

Expand|Select|Wrap|Line Numbers


Hi.

Operator Set is used to set reference to object variable. For variables declared as strings it will certainly not work. (code lines 9-14)
What is Close (code line 30) supposed to close?

Hi, that close is in there by error by the look of it. I''ve removed it and also changed the string to variant. When I run it it says "object required."

Here''s how the code looks now:

Expand|Select|Wrap|Line Numbers


Hi, that close is in there by error by the look of it. I''ve removed it and also changed the string to variant. When I run it it says "object required."

Here''s how the code looks now:

Expand|Select|Wrap|Line Numbers


这篇关于从查询/记录集打印。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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