用于显示空值的初始表单视图 [英] Initial Form View to Display Null Values

查看:48
本文介绍了用于显示空值的初始表单视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,我无法弄清楚如何打开一个表单,其中所有对象都被清空,直到用户选择适当的项目名称。我的表单有几个对象(12),其中从我的自定义代码表中提取信息。我还有两个子表单绑定到我的数据库中的另外两个表。我有一切工作,因为如果您要选择和/或更新信息,它会相应地正确更新表格和/或表格。我遇到的问题是最初打开表单时,我无法将所有对象都空白?当它打开时,我的表格中的第一行正在显示。我希望用NULL值打开此表单,直到用户选择一个项目名称,然后它会显示我的三个表中的相应信息。我希望我在这里遗漏了一些非常基本的东西,但是我已经连续两天在这个工作了,我不知道该怎么做。


任何帮助将不胜感激。


Birky

解决方案

在加载时将表单移动到新记录怎么样?



在Form最初打开时,在所有字段中输入Null值将是一件非常简单的事情。唯一的问题是Null值将写入第一个记录中的每个字段 - 不完全是您想要的。但是,有一个非正统的解决方案:

  1. 制作表格的精确副本(CTL + C / CTL + V)。
  2. 将副本的RecordSource设置为Null。
  3. 将副本上每个Control的ControlSource设置为Null。
  4. 将导航按钮设置为否。
  5. 您现在拥有的是原始表单的完全副本,除了它是Unbound,其所有控件都没有控件来源,并且Form本身没有导航方式。表单上的所有字段都是空白的,可能应该被锁定以消除任何数据输入的可能性。
  6. 用户从副本中选择项目名称后,打开基于此的真实表单选择。
  7. 如上所述,它有点不正统,但它确实有效,直到有人提出更好的解决方案。

注意:只要你不关心用户是否向后导航并在从项目名称下拉列表中进行选择之前显示实际数据,兔子的想法会更实用。


< blockquote>如何在表单打开时将其设置为新的记录集?


一旦选择了记录,是否可以使未绑定的表单成为绑定表单?


感谢您的帮助,我确实很感激。

Birky


I have an issue where I can?t figure out how to open a form where all the objects within are nulled out until a user selects an appropriate Project Name. My form has several objects (12) within which are pulling info from my Custom Code table. I also have two sub-forms that are tied to two other tables within my database. I have everything working, for if you were to select and or update information it is properly updating the form and or tables accordingly. The problem I have is when the form is initially opened, I can not get all the objects to be blank? When it opens the first row within my table is being displayed. I?d like to have this form open with NULL values until a user selects a Project Name where it then displays the appropriate information from my three tables. I?m hoping I am missing something very basic here but I have been working on this one for two days straight and I can?t figure out how to do it.

Any help would be greatly appreciated.

Birky

解决方案

What about just moving the form to a new record when it loads?


It would be a very simple matter to enter Null Values in all Fields when a Form initially opens. The only problem with that is the Null Values would be written to every single Field in the 1st Record - not exactly what you would want. There is, however, an unorthodox solution:

  1. Make an exact copy of your Form (CTL+C / CTL+V).
  2. Set the copy''s RecordSource to Null.
  3. Set the ControlSource of every Control on the copy to Null.
  4. Set the Navigation Buttions to No.
  5. What you have now is an exact duplicate of the original Form except that it is Unbound, all its Controls have no Control Sources, and the Form itself has no means of navigation. All Fields on the Form will be blank and probably should be Locked to eliminate any possibility of data entry.
  6. Once the User selects a Project Name from the copy, open the ''real'' Form based on this selection.
  7. As stated, it is a little unorthodox but it definately will work until someone comes up with a better solution.

NOTE: Rabbit''s idea would be more practical as long as you don''t care if the User navigates backwards and displays actual data prior to making a selection from the Project Name Drop Down.


How do I set it to a new record set when the form opens?

Is it possible to make an unbound form become a bound form once a record is selected?

Thanks for the help on this, I sure do appreciate it.
Birky


这篇关于用于显示空值的初始表单视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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