仅当子表单包含数据时,主表单上的子表单(选项卡式页面)才可见 [英] Subform (tabbed page) visible on main form ONLY if subform has data

查看:78
本文介绍了仅当子表单包含数据时,主表单上的子表单(选项卡式页面)才可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的主表单有很多选项卡式子表单页面,还有一个用于NEW记录的按钮和一个用于EXISTING记录的按钮。用户可以从从该命令按钮打开的下拉组合框中访问特定的现有记录。选择记录将返回MAIN表单并填充所有字段,包括所有子表单上的字段。最初加载主窗体时,子窗体选项卡不可见。加载选定的现有记录并重新打开主窗体后,我希望所有那些在任何字段中都有数据的子窗体(选项卡)在主窗体上可见(即可以使用其选项卡进行选择) ,当它重新打开。请记住,没有子表单将是CURRENT表单,因此我无法使用ME / ME!功能。基本上,我需要一个正确的VBA代码,沿着以下几行;

IF 子表单不为空,然后子表单 visible = true



我似乎很难引用一个非开放/当前的子窗体......两次。我的子窗体及其控制选项卡具有相同的名称。


我将专门为每个子窗体编写正确的代码。我目前的想法是将这些作为AfterUpdate事件放在代码后面的代码中,当选择从组合框中购买用户时。

My main form has many tabbed subform pages, and a button for NEW record and one for EXISTING record. A user can access a specific existing record from a dropdown combobox that opens from that command button. Selecting a record returns to the MAIN form and populates all fields including those on all subforms. The subform tabs are NOT VISIBLE when the main form is originally loaded. After the selected existing record loads and the main form reopens, I want ALL of those subforms (tabs) that have data in any field to become visible (i.e. available for selection using its tab) on the main form, when it reopens. Remember that none of the subforms will be the CURRENT form so I cannot use the ME/ME! function. Essentially, I need a correct VBA code along the following lines;

IF subform is not null, then subform visible = true


I seem to be having difficulty referencing a subform that is not open/current ... twice. My subform and its controltab have the same name.

I will write the correct code for each subform specifically. My current thought is to put these as an AfterUpdate event in the code behind the action that occurs when the selection is made buy the user from the combobox.

推荐答案

给这个看一下:

https:// bytes .com / topic / access / answe ... 3-no-data-form


mminieri,


欢迎来到字节!


为了澄清目的:
mminieri,

Welcome to Bytes!

For clarification purposes:

我的主窗体有很多标签子窗体页面
My main form has many tabbed subform pages



我不知道这意味着什么。您有:

  • 许多子表单?
  • 一个带有标签控件的子表单有多页?
  • 一个标签控件每页上的子表格?

  • TWINNYFO


    [IMG] ftp://minieriassociates.com/public_ftp/Mainform_tabsview.jpg [/ IMG]


    发布图片(上面链接)查看。每个标签下只有数据字段。

    @twinnyfo
    TWINNYFO

    [IMG]ftp://minieriassociates.com/public_ftp/Mainform_tabsview.jpg[/IMG]

    Posted an image (LINKED above) to view. There are only data fields under each tab.

    @twinnyfo


    这篇关于仅当子表单包含数据时,主表单上的子表单(选项卡式页面)才可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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