窗体已经打开,不能显示为有的模式的
form1窗体中Private Sub Text1_Change()
Frmzt.Show 1
End Sub
Frmzt窗体中
Private Sub DataGrid1_Click()
Form1.Text1 = Adodc2.Recordset.Fields(0)
Unload Me
End Sub
Private Sub Form_Load()
Option2.Value = True
End Sub
Private Sub Text1_Change()
Dim fivepen As String
Dim spell As String
'如果没有选择部分信息,则退出
If Text1.Text = "" Then
Exit Sub
End If
fivepen = "select medname,medspec,fivepen,spell from dbo.Medicine where fivepen like'" _
& Text1.Text & "%" & "'"
spell = "select medname,medspec,fivepen,spell from dbo.Medicine where spell like'" _
& Text1.Text & "%" & "'"
If Option2.Value Then
With Adodc2
.RecordSource = fivepen
.Refresh
End With
End If
If Option1.Value Then
With Adodc2
.RecordSource = spell
.Refresh
End With
End If
'读取数据
End Sub
要在form1窗体中的文本框录入数据时弹出Frmzt窗体后,将Frmzt窗体中选中的数据赋值到form1窗体中的文本框中,但出现实时错误‘400
窗体已经打开,不能显示为有的模式的
不知错在哪?请各位帮个忙修改主,先谢了