ms-access - 取消form.unload事件时如何返回到指定控件?
问题描述
我打开表格:
DoCmd.OpenForm "Form", acNormal, , , acFormEdit, acWindowNormal
表单卸载事件:
Private Sub Form_Unload(Cancel As Integer)
If Len(Me.acntName.Value) = 0 Then
Msgbox "Account Name must be specified."
Cancel = True
Me.acntName.SetFocus
end if
End Sub
这会将我返回到表单,但不会将焦点放在控件上。我该怎么做呢?
解决方案
推荐阅读
- c# - RegExp to extract values from a string within quotes
- css - CSS media query overwriting the style of the page, even in lower resolutions
- r - Visualizing All Possible Linear Regression Predictions from all Combinations of Regression Variables
- node.js - Is there a way to do multiple efficient (index-using) finds in one request?
- celery - 在 celery 中,当任务入队时,将上下文元数据从发送方进程传递给工作人员的适当方法是什么?
- reactjs - React Router Dom hangs browser
- php - UPDATE query on php laravel not working, fetchAll()
- html - SVG 图像标签中的图像显示在桌面浏览器中,而不是 iphone
- python - Python链表无法保存头节点
- android - Android Visualizer FFT 数据取决于体积