VB点击启动后第一次能正常,结束启动后,再一次点击启动,VB就会闪退
运行环境是windows10专业版vb6.0连接access2016
具体代码如下:
Private Sub Form_Load()
Dim cn As New Connection
Dim rs As New Recordset
Dim constr As String
cn.ConnectionString = "provider=microsoft.ace.oledb.12.0;" & "data source=" & App.Path & "\RD.accdb"
cn.Open
constr = "select * from login where id=1"
Set rs.ActiveConnection = cn
rs.Open (constr)
Text1.Text = rs.Fields(1).Value
Text2.Text = rs.Fields(2).Value
rs.Close
cn.Close
End Sub