使用未绑定的组合框与Access&QUOT追溯;连续纸" [英] Drilldown using unbound comboboxes with Access "Continuous Form"

查看:219
本文介绍了使用未绑定的组合框与Access&QUOT追溯;连续纸"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前已经得到了是一个简单的(R)的方式来做到这一点。

我有一个情况我现在用连续的形式列出的部件。该部分上市有像部件类型,制造商,部件编号和数量。这份名单是部分实例和放大器;数量。我可以从零件的情况下寻找其他的东西了,所以显示已有部分是没有问题的,只使用一个连接的查询检索相关记录或使用使用DLookup单独拉等领域。

I have a situation where I am listing parts using continuous forms. The parts listing has things like the part type, manufacturer, part number and the quantity. The list is of the part instances & quantity. I can look the other things up from the instance of the part, so displaying existing parts is no problem, just use a joined query to retrieve the related records or using a DLookup to pull the fields individually.

Type    Manufacturer    Number   Qty
-------------------------------------
Widget  Acme            123ab     1
Widget  Acme            456       1 
Anvil   Xyz             12345     2
Llama   Northwind       322-12A   1
...

问题是其中用户需要增加新的零件。有成千上万不同的部分,所以他们不能真正从一个单一的零件号组合框中选择。他们希望能够选择一个零件类型,制造商,然后从三种不同的组合框的连续缩小导致每个组合框的部件号。

The problem is where the users need to add new parts. There are thousands of different parts, so they can't really choose from a single part number combobox. They want to be able select a part type, manufacturer, and then the part number from three different comboboxes that successively narrow the results in each combobox.

选择一个部件类型>>选择制造商谁使这些类型之一>>这种类型的部分由制造商选择部分号>>进入量

好了,我可以用2未绑定的组合框与使用DLookup为默认值,并通过他们的行来源的查询链接它们。最终的组合框是其行源部件号过滤 - 所以只列出了选择的类型和制造商的部分。我已经做到了与之前这种情况下,它工作得很好。

Ok, so I can use 2 unbound comboboxes with a DLookup as default, and link them via their Row Source queries. The final combobox is part number with its Row Source filtered - so it only lists the parts from selected type and manufacturer. I have done that before with this kind of situation and it works well.

不过我想连续形式的访问做到这一点,它的使用DLookup返回相同的结果对每个记录。例如,

However I am trying to do this with continuous forms in Access and it is returning the same result for the Dlookup on each record. E.g.

Type    Manufacturer    Number   Qty
-------------------------------------
Widget  Acme            123ab     1
Widget  Acme            456       1 
Widget  Acme            12345     2
Widget  Acme            322-12A   1
...

哎呀,这是怎么回事?我Dlookups似乎只能使用从第一条记录的值。为什么呢?

这甚至一个好办法做到这一点?有没有更好的方式比下钻组合框使用连续的形式?唯一的其他方式我能想到的解决这个问题是使用组合框,其中的细节都在一个对话框中选择,然后将零件号是从填充一个添加/编辑部分类型的形式。但是,这似乎更是缺憾。

Is this even a good way to do this? Is there a better pattern to use than drill-down comboboxes on the continuous form? The only other way I can think of to get around this is to use the comboboxes on a "add/edit part" type form where the details are selected in a dialog and then the part number is populated from that. But that seems even more kludgy.

推荐答案

使用未绑定的控件连续窗体上只会驱使你疯狂,因为未绑定的控件只能引用选定的记录,这可能是任何人。我觉得对于增加新的记录弹出的形式是相当不错的,而且便于用户理解。

Using unbound controls on a continuous form will only drive you demented, because an unbound control can only refer to the selected record, which could be any of them. I think the pop-up form for adding new records would be quite nice, and easy for the user to understand.

这篇关于使用未绑定的组合框与Access&QUOT追溯;连续纸"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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