如何停止表单的Load事件处理程序跳过某些语句

时间:2019-01-11 18:09:18

标签: vb.net

我正在使用VB2017。运行我的项目时,窗体的Load事件到达语句Dim engdb As New DAO.DBEngine的最远位置,然后跳到Sub的末尾。我解决不了请帮助我

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Dim fullPath As String = AppDomain.CurrentDomain.BaseDirectory
    Dim engdb As New DAO.DBEngine   '<===== read this line and jump to end sub
    Dim db As DAO.Databas    
    db = engdb.OpenDatabase(fullPath & "filename.accdb", False, False)
    '...
    '.
End Sub

0 个答案:

没有答案