在已更改的字段名称中查找参数的表单。 [英] Form looking for Parameters in field name that was changed.

查看:51
本文介绍了在已更改的字段名称中查找参数的表单。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我是Access 2003的新手(尽管我在脚本上的时间很多)并且我正在创建一个库存数据库。在我原来的表设计中,我有一个字段tblTrans.Date,我被建议改变,因为Date是一个函数。我将字段名称更改为TransDate。所有以前创建的查询和报告都会自动更新,以使用此新字段名称作为参考,仍可正常工作。


现在我正在创建一个新的未绑定表单来查找特定的项目;表单有两个级联组合框,可选择供应商,然后选择项目编号。我创建了一个命令按钮,理论上打开frmProduct使用项组合框来过滤结果(我使用命令按钮向导来创建它)。当我单击按钮时,弹出一个询问参数tblTrans.Date的提示。


我已经查看了所有我能想到的事件过程,查询和行数来找到这个引用的位置并且没有运气。


有没有什么方法可以搜索这个''字段引用''或者查看所有涉及的事件序列以尝试找到这个引用?


有没有人对我如何解决这个问题有任何想法?我很感激任何建议或想法。谢谢!

Hi everyone, I am new to Access 2003 (though my time on scripts has helped alot) and am creating an inventory database. In my original table design I had a field tblTrans.Date which I was advised to change as Date is a function. I changed the field name to TransDate. All of the previously created queries and reports automatically updated to use this new field name as a reference and still work fine.

Now I am creating a new unbound form to find a specific Item; the form has two cascading comboboxes that select vendor and then item number. I created a command button that theoretically opens frmProduct using the item combobox to filter the results (I used the command button wizard to create this). When I click the button a prompt asking for the parameter tblTrans.Date pops up.

I have looked in all of the event procedures, queries, and rowsources I can think of to find where the this reference is and have had no luck.

Is there any way I can ''search'' for this ''field reference'' or view the sequence of events for everything involved to try and locate this reference?

Does anyone have any ideas about how I might fix this issue? I would appreciate any advice or thoughts. Thanks!!

推荐答案

有些地方变量可以隐藏。

当表单基于查询时,打开查询并双击表格旁边的灰色区域。应该显示属性窗口,有时排序或过滤器仍然保持旧状态。变量。


Nic; o)
There are some places where variables can hide.
When the form is based on a query, open the query and double-click the grey area besides the table(s). A properties window should show and there sometimes the sort or filter still holds an "old" variable.

Nic;o)


感谢您的提示,我正在使用的表单是一个未绑定的表单,我已经检查过对我表单上的组合框的查询。


你的建议让我思考,我意识到我试图打开的形式(frmProducts)有一个按交易日期排序的子表单(frmTrans)。我打开了frmtrans,它仍然引用了Date,所以我把它改成了TransDate。


我不再收到TransDate的提示,但是当我点击OK按钮时,我仍然会看到一个空白表格。关闭所有内容并保存更改后,我尝试创建一个新的确定按钮,但我仍然有一个空白表单(已过滤,只显示1条记录)。我还使用相同的两个组合框和一个全新的OK按钮创建了一个新表单,它还打开了一个过滤后的空白表单。


我也注意到在子表单trans中,排序依据日期不起作用。


你有什么想法为什么会发生这些事情,如果你这样做,我该如何解决它们。


谢谢你所有你的帮助!
Thanks for the tip, the form I am working with is an unbound form, and I had already checked the queries for the comboboxes that were on my form.

Your advice got me thinking though and I realized that the form I was trying to open up (frmProducts) had a subform (frmTrans) sorted by the transaction date. I opened frmtrans and it still referenced Date so I changed it to TransDate.

I no longer get the prompt for TransDate but I still get a blank form when I click on the OK button. I tried to create a new OK button after closing everything and saving changes but I still got a blank form (filtered and only displaying 1 record). I also created a new form with the same two comboboxes and a completely new OK button and it also opened a filtered blank form.

I also noticed that in the subform trans, the sort by date is not working.

Do you have any ideas why either of these things may be occuring and if you do, how do I fix them.

Thanks for all your help!


确保不仅更改了Controlsource,还确保了Name属性(参见其他选项卡下)。

也单击子窗体并在DataTab下检查链接字段以保存正确的字段。

最后检查数据选项卡下的空白表单的属性,数据输入和数据输入。属性需要设置为否。


Nic; o)
Make sure that not only the Controlsource has been changed, but also the Name property (see under Other tab).
Also single-click the subform and check under the DataTab the linkage fields to hold the correct fields.
Finally check the blank form''s properties under the Data tab, the "Data entry" property needs to be set to "No".

Nic;o)


这篇关于在已更改的字段名称中查找参数的表单。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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