如何在Access 2007中加载时隐藏标签

时间:2016-07-28 10:08:09

标签: ms-access-2007

我有一个记录器表单,它隐藏文本和组合框,直到你点击"开始活动"但无论如何我还可以让标签在加载时消失,然后一旦按下开始按钮就会出现?

以下是我的代码示例:

Private Sub Form_Load()

strUserID = Environ(" USERNAME")

AppVersion = "Version - " & DLookup("Version", "Version", "ID = 1") & " - " & DLookup("VersionDate", "Version", "ID = 1")
Me.txtVersion = AppVersion
Me.cmdStartCall.Visible = True
Me.txtPolicyClaimReference.Visible = False
Me.txtJobReference.Visible = False
Me.txtNotes.Visible = False
Me.CboContactMethod.Visible = False
Me.CboTitle.Visible = False
Me.CboDepartment.Visible = False
Me.CboLocation.Visible = False
Me.txtScheme.Visible = False
Me.txtFirstName.Visible = False
Me.txtSurname.Visible = False

End Sub

因此,如果我们假设每个txt或cbo框具有相同的名称标签,除非激活,否则如何让它们不显示?

由于 丹

1 个答案:

答案 0 :(得分:0)

标签必须附加(关联)到其文本框/组合框,然后它们会自动隐藏。

附加分隔标签:

  • 选择标签
  • 发出剪切命令
  • 选择要将标签附加到的控件
  • 发出粘贴命令。

(来自http://www.consultdmw.com/access-control-labels.htm