Dbl单击表单域以基于值打开另一个表单 [英] Dbl click a form field to open another form based on value

查看:120
本文介绍了Dbl单击表单域以基于值打开另一个表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现这个帖子并且它接近我所需要的(http://bytes.com/topic/access/answers/208888-open-form-b​​ased-field-entry),但并没有完全回答我的问题。我在表单上有一个字段(subfrm_xmit_docs.Path),当点击dbl时,它应该打开一个不同的表单并转到与所单击的字段中的值相对应的记录。第二种形式的字段是frm_hardcopies.Filename。此外,使用该过程,如果单击dbl的字段为空,有没有办法防止出错,或者如果为null,它根本不加载第二个表单?

I found this thread and its close to what I need (http://bytes.com/topic/access/answers/208888-open-form-based-field-entry) but doesnt completely answer my issue. I have a field on a form (subfrm_xmit_docs.Path) which, when dbl clicked should open a different form and go to the record that correspondes to the value in the field that was clicked on. The field in the 2nd form is frm_hardcopies.Filename. Also, using the process, is there a way to prevent an error if the field being dbl clicked is empty, or it just doesnt load the 2nd form at all if null?

推荐答案

到目前为止你有什么代码?


Pat
What code do you have so far?

Pat


我有这个附加到dblclick事件,但它没有打开frm_hardcopies和跳到正确的记录。它只是打开表单并转到新记录。

I have this attached to the dblclick event, but it doesnt open frm_hardcopies and jump to the correct record. It just opens the form and goes to a new record.

展开 | 选择 | Wrap | 行号


给出代码你''我发布了,我不希望表格除了打开空白之外还要做任何其他事情。打开表单时,您需要告诉它从哪里获取数据。对于绑定表单,这通常意味着将表单的'recordsource属性设置为Form Open事件中的正确表名,查询名或SQL字符串。


您可以使用OpenForm Filter参数,甚至是OpenArgs参数来过滤表单的'recordsource,从而获取特定的记录或记录,但是您还没有分配任何内容stLinkCriteria ...所以当你发布它时,过滤器不会做任何事情。


Pat
Given the code that you''ve posted, I would not expect the form to do anything other than open up blank. When a form opens up, you need to tell it where to get its data from. For a bound form, this usually means setting the form''s recordsource property to the proper table name, query name, or SQL string in the Form Open event.

You can filter the form''s recordsource and thereby get to a particular record or records by using the OpenForm Filter argument, or even the OpenArgs argument, but you have not assigned anything to stLinkCriteria...so as you have posted it, the filter is not going to do anything.

Pat


这篇关于Dbl单击表单域以基于值打开另一个表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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