且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

基于其他领域的独特价值观

更新时间:2023-02-16 16:04:18

我希望你意识到这不是直截了当的事吗?


请发布你现在的方式数据和用于填充ComboBox的SQL。通过新领域,我们可以为您做点什么,但无论您最终如何,都可能非常笨拙。你似乎想要一些没有以适当的方式存储的信息,并且只有那么多人可以做到这一点。
I hope you realise this is anything but straightforward?

Please post what you have now in the way of data and the SQL for populating your ComboBox. With the new field we may be able to do something for you, but whatever you end up with is likely to be very clumsy. You appear to want information which has not been stored in an appropriate way, and there''s only so much one can do with that.


Hello NeoPa,
>
我会尝试进一步解释;


我有一个生成报告的表格。

表格基于查询包含所有记录。


在表格上有4个组合框,用户可以从中选择某些数据(如[tr_type] new,renewal,extension,DIP)>

在表格的下半部分是一个打开报告的按钮。

在查询条件中我使用Like [forms]![frm_report]。[combo_type ]& *


这对于组合框很有用,我会得到超级报告。


但是,现在我必须打印两份报告(类型新和类型扩展名


我想要的是当我从组合框中选择new时,其结果将是是所有记录,其中类型是新或扩展


这是否更好地解释了我的问题?

我真的希望你能帮助我!


提前致谢,

pierre
Hello NeoPa,

I will try to explain a little further;

I have a form for generating a report.
The form is based on a query with all records in it.

On the form there are 4 combo boxes from which the user can choose certain data (like [tr_type] new, renewal, extension, DIP)

On the lower part of the form is a button to open the report.
In the query criteria i use a Like[forms]![frm_report].[combo_type] & "*"

This works great for the comboboxes and i get super reports.

However, now i have to print two reports (a type "new" and a type "extension"

What i want is that when i choose "new" from the combobox with the type in it, the result will be all records where type is either "new" or "extension"

Does this explain my problem better?
I truly hope you can help me!

Thanks in advance,
pierre


这是一个更好的解释皮埃尔,但它不是给我我要求的详细信息。你有问题吗?


听起来你只想从列表中排除记录{2,Extension}。看起来非常简单。


当你来设计和调用报告时,我建议你删除过滤中的任何引用电子表格。相反,在VBA中构建它并仅在它打开时将其应用于报表。这有意义吗? 表单上的示例过滤提供了有关如何管理这些内容的提示。本文侧重于过滤表单,但表单和报表使用相同的方法。
It is a better explanation Pierre, but it doesn''t give me the details I requested. Are you having a problem with that?

It sounds like you simply want to exclude the record {2,"Extension"} from your list. This seems very straightforward.

When you come to designing and invoking the report, I would suggest getting rid of any references in your filtering to the form. Instead, build this in the VBA and apply it to the report only when it''s opened. Does this make sense? Example Filtering on a Form gives tips on how that can be managed. The article focuses on filtering forms, but the same approach is used for Forms and Reports.