向查询添加表单标签 [英] Add a forms label to a query

查看:121
本文介绍了向查询添加表单标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个查询,其中包含从表中定义的字段。我在表单上有一个标签,我想添加到此查询中,表单名称是params,标签名称是match4。可以在表单上更改标签标题,并且我希望新标题位于查询中,可以这样做。任何帮助,将不胜感激。

再次感谢您的帮助。

I have a query with fields defined from a table. I have a label on a form that I would like to add to this query, the forms name is params and the label name is match4. The labels caption can be changed on the form and I want that new caption to be in the query, can this be done. Any help would be appreciated.
Thanks again for your help.

推荐答案

如果您正在谈论从功能区/菜单构建的查询,那么只有方法是使用qrydef集合。

删除旧查询,然后重建并将其添加到集合中。

如果你在谈论内置的sql字符串VBA然后用来打开一个记录集,然后只需在代码中使用字段标题来构建字符串。


-z
If you are talking about a query that you have built from the ribbon/menu then the only way is to use the qrydef collection.
Delete the old query and then rebuild and add it to the collection.
If you are talking about an sql string that is built in VBA and then used to open a record set, then just use the field caption in your code to build the string.

-z


谢谢回复。我不知道如何将表单中的标签添加到查询中。当我通常设计查询时,我使用简单的查询设计而不是向导,尽管我还使用sql字符串来构建查询时查询中的内容需要更改。我不知道如何在sql字符串中编写表单标签或者我只是使用查询设计。
Thanks for the reply. I''m not sure how to add a label from a form to a query. I use the simple query design not the wizard when I usually design a query, although I do also use the sql string to build query''s when things in the query need to change. I not sure how to code a form label in the sql string or when I just use the query design.


OK

为了不深入最后,我们将不得不理解你在做什么。虽然更改标签标题并不常见(我将它们用于用户反馈)但是我怀疑你正在使用控件是不常见的;因此,请提供一些详细信息,说明您对表单的操作以及一些示例代码以及任何错误的解释。 (当您发布代码时,请使用鼠标选择它,然后单击撤消/重做旁边的< code />按钮。


-z
OK
In order not to go into the deep end we''re going to have to understand what it is you''re doing. Although it is not unusual to change a label caption (I use them for user feed back) it is unusual to use the control as I suspect you are doing; thus, please provide some detail as to what you''re doing with the form and some example code with an explanation of any errors. (when you post code, select it with the mouse and click the <code/> button above next to the undo/redo.

-z

这篇关于向查询添加表单标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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