单击一个表单中的记录以另一个表单打开相同的记录 [英] clicking a record in one form to open the same record in another form

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

问题描述

您好。


我有一个显示记录列表的摘要表单。我需要知道如何通过单击一个字段,它会自动打开(重定向我)另一个表单(查看其详细信息)但调用相同的记录,而不必打开第二个表单然后使用查找功能调用它在第二种形式上。


请帮助。


谢谢。

解决方案

使用 DoCmd.OpenForm()打开第二个表单并使用 WhereCondition 参数。


谢谢,NeoPa。


我是VB编码的新手,并且最近才开始将VB包括在内(感谢Bytes.com的一些有价值的输入!:))我正在研究Access数据库。请带我完成

展开 | 选择 < span class =codeDivider> | Wrap | 行号


我想有很多步骤。

  1. 在其他任何事情决定Click或DoubleClick是否是你想要的触发机制之前。代码非常相似,但只是单击可能比您预期的更多。
  2. 在要启用此功能的表单上获取每个控件,然后查看属性面板(Alt-Enter为您打开它们) 。
  3. 找到属性 在Dbl上单击 ,然后双击它的名称。这将字符串值[Event Procedure]设为在该属性中。
  4. 然后单击旁边的小按钮,上面有省略号(...)。这将带您进入代码。
  5. 代码窗口将显示模块的基础,该模块应如下所示:

    展开 | 选择 | Wrap | 行号

Hello.

I have a summary form that displays a list of records. I need to know how to, by clicking a field one record, it automatically opens (redirects me to) another form (to view its details) but calling up the same record, without necessarily opening the second form then using the Find feature to call it up on the second form.

Kindly assist.

Thank you.

解决方案

Open the second form using DoCmd.OpenForm() and use the WhereCondition parameter.


Thanks, NeoPa.

I''m kinda new to VB coding, and have only recently started to including VB (thanks to some valuable input from Bytes.com! :) ) into the Access Database I''m working on. Please take me through the coding for the

Expand|Select|Wrap|Line Numbers


I suppose there are a number of steps.

  1. Before anything else decide if Click or DoubleClick is what you want for your trigger mechanism. The code is very similar but just clicking may happen more than you expect.
  2. Take each control on the form where you want to enable this feature and look at the Properties panel (Alt-Enter opens them for you).
  3. Find the property On Dbl Click and double-click on the name of it. This puts the string value "[Event Procedure]" in the property.
  4. Next click on the little button next to that with an ellipsis (...) on it. This takes you to the code.
  5. The code window will show you the basis of a module which should look something like :

    Expand|Select|Wrap|Line Numbers


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

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