获得正确的价值 [英] Get Correct Value

查看:91
本文介绍了获得正确的价值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Form1绑定到一个包含两列的表:Week_Number,Week_Date。 Work_Number列的编号为1但52.DayDate具有该年中每个星期六的日期。当用户点击一行时,我想要点击打开Form2并将Week_Number值传递给Form_2。


Form_2有三列:Week_Number,Home_Team_ID和Away_Team_ID。当它打开时,我想要光标。在与传递值对应的第一行上。另外,我想只显示那些与这个值相匹配的行。


如何实现这一目标?


最后,这是更难或更容易使用子表单?

Form1 is bound to a table with two columns: Week_Number, Week_Date. Work_Number column has numbers 1 though 52. Week_Date has the date of each Saturday in the year. When a user clicks on a row, I want that "Click" to open Form2 and pass the Week_Number value to Form_2.

Form_2 has three columns: Week_Number, Home_Team_ID, and Away_Team_ID. When it opens, I want the "cursor" to be on the first row that corresponds to the passed value. Also, I want to display only those rows which match this value.

How do I make this happen?

Lastly, would this be harder or easier using a sub-form?

推荐答案

如果Form_2中有多个记录具有相同的Week_Number,那么子表单将是最佳选择。如果Form_1中的每条记录在Form_2中只有一条记录,那么您可以使用查询将它们全部放在同一表单上以组合数据,或者只将所有字段合并到一个表中。但是如果你想要它们在不同的形式上,那么像
If there are multiple records in Form_2 that have the same Week_Number, then a subform would be the way to go. If there is only one record in Form_2 for each record in Form_1, then you could put them all on the same form using a query to combine the data or just combine all the fields into one table. But if you want them on separate forms, then something like
展开 | 选择 | Wrap | 行号


  1. 您可以通过Form1的OpenArgs属性将Form1中的[Week_Number]字段的值传递给Form2,即:
  1. You can pass the Value of the [Week_Number] Field in Form1 to Form2 via the OpenArgs Property of Form1, namely:
展开 | < span class =codeLinkonclick =selectAll(this);>选择 | Wrap | 行号


我将使用连续视图中显示的主窗体并链接到单视图中的子窗体两种形式的Week_Number。
I would use a main form displayed in Continuous View and link to a subform in Single View using the Week_Number from both forms.


这篇关于获得正确的价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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