czyname = Combo1.Text空值这是什么原因
Public czyname As StringPrivate Sub Command2_Click()
Dim rec As ADODB.Recordset
Set rec = New ADODB.Recordset
rec.Open "SELECT * FROM caozybiao", cn, adOpenStatic, adLockOptimistic
Sql = "select * from caozybiao where xinmin= '" & Combo1.Text & "'"
Set rs = cn.Execute(Sql)
If rs.EOF = True Then
MsgBox "无此用户", vbCritical + vbOKOnly, "提示"
Combo1.SetFocus
Else
If Text1.Text = rs.Fields("mima") Then
czyname = Combo1.Text
Unload dlwin
win.Show
Else
MsgBox ("用户名或密码不正确!"), vbCritical + vbOKOnly, "提示"
End If
End If
czyname = Combo1.Text 'Combo1.Text有值/czyname是空值?这是什么原因,请教大神怎么解决?
[此贴子已经被作者于2021-8-20 23:10编辑过]