【发布时间】:2013-02-19 12:46:45
【问题描述】:
我想禁用 Access 的默认 msgbox。这是我的代码,
Private Sub textRequiredDate_AfterUpdate()
DoCmd.SetWarnings False
If Not IsDate(textRequiredDate.Value) Then
MsgBox "Please enter a date"
Else
End If
If textRequiredDate.Value < textOrderDate.Value Then
MsgBox "Required date must be after Order Date"
textOrderDate.SetFocus
textRequiredDate.SetFocus
textRequiredDate.Value = ""
Else
End If
End Sub
当我在要求的日期写信时,我得到默认的 MS 访问 msgbox,我想将其更改为我自己的消息框。
【问题讨论】:
-
关闭警告通常不是一个好主意,您认为这些 msgbox 与什么有关?
-
在什么情况下会出现这种情况?
-
我想禁用 msgbox 的访问权限并使用我自己的 msgbox。我有上面写的代码
-
Good :) 从不使用 DoCmd.SetWarnings False 并且违反了该规则,请确保重新打开警告。它不会像您认为的那样做,它是系统范围的,它会给您带来无穷无尽的问题。 现在重新切换警告!见stackoverflow.com/questions/14957869/…
-
@Remou He he ^_^,将我们链接回这个问题,不过你已经提供了关于 Andrey 答案的正确链接。