如何按名称订购表单资产 [英] How to order form assets by name

查看:48
本文介绍了如何按名称订购表单资产的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最初,我的表单中的所有资产都是按产品ID排序的。 (我没有设置在我下载数据库后怀疑它是某种默认值?)


为了将所有类似的资产放在一起,我使用了表单Order By。功能在表单属性框中选择产品名称。


这很有效,直到我试图变得聪明并使用未绑定的txt框和命令添加了序列号搜索功能按钮。虽然搜索功能有效(ish - 如果有多个具有相同序列号的资产,它只会找到第一个?)我的表单已恢复为按产品ID排序。


有没有办法通过产品ID停止表单排序并重置表单,以便按产品名称排序?


Ezzz

Initially all the assets in my form were ordered by the product Id. (Not set by me suspect it is some sort of default after i downloaded the database?)

In order to keep all similar assets together i used the forms "Order By" function in the forms properties box to select "Product Name".

This worked well until i tried to get clever and added a serial number search function using an unbound txt box and a command button. Although the search function works (ish - if there are more than one asset with the same serial number it will only find the first one?) my form has reverted to being Ordered by the product Id.

Is there a way to stop the form ordering by the Product Id and reset the form so it will order by the Product name?

Ezzz

推荐答案

我确定有,但它完全取决于你的Command Button背后的代码。命令按钮不能自己做任何事情。他们只是给你一个钩子来挂你的代码。在我们建议撤消它之前,我们需要了解代码的作用。
I''m sure there is, but it would depend absolutely on what code is behind your Command Button. Command Buttons don''t do anything on their own. They just give you a hook to hang your code on. We''d need an idea of what the code is doing before we can suggest a way to undo it.


按钮后面的cmd搜索编码如下: -
The cmd search coding behind the button is as below:-
展开 | 选择 | Wrap | 行号


您正在进行搜索/查找而不是过滤器。不同之处在于Filter方法从显示的列表中删除所有不匹配的记录。因为我倾向于自己使用Filter方法,所以我没有太多经验来搜索/找到我害怕。似乎这(第19行)是您正在进行重新排序的地方(我猜)。


我会尝试设置 .OrderBy 参数,看看是否有任何修复。如果没有,那么你可以考虑使用Filter方法,如果它当然与你的要求兼容。
You''re doing a Search/Find rather than a Filter. The difference being that the Filter approach removes all non-matching records from the displayed list. As I tend to use the Filter approach myself, I don''t have much experience with the Search/Find one I''m afraid. It appears that this (Line #19) is where your reordering is taking place (I would guess).

I would attempt to set the .OrderBy parameter, to see if that fixes anything. If not, then you could consider the Filter approach instead, if that were compatible with your requirements of course.

如果你也知道一种方法来适应它,那么它将继续搜索具有相同序列号的更多资产!
If you also know of a way to adapt it so it will continue to search for further assets with the same serial numbers that would be tops!!!



Filter方法将显示符合条件的所有记录。从我的阅读情况来看,这可能是一种更合适的方式。只有你能真正做出决定。

The Filter approach would show all those records that match your criteria. This may be a more appropriate way for you from my reading of your situation. Only you can really decide that though.


这篇关于如何按名称订购表单资产的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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