VB 弹出子窗口后父窗口不能动,怎么设置,求解,谢谢!
还有一个问题就是我连接数据库。
dim RsParty As New ADODB.Recordset
RsParty.Open "select * from 党员表 order by 序号",DBCON, adOpenKeyset, adLockOptimistic
RsParty里的姓名有18个,我要怎么一个一个取出来用IF来判断呀,比较说有个TextBox.text = "123"
For j = RsParty.RecordCount To 2 Step -1
if TextBox.text = RsParty-->里18个名字里一一比对出来then
.....有什么办法呀~~!谢谢了!
还有一个问题就是我连接数据库。
dim RsParty As New ADODB.Recordset
RsParty.Open "select * from 党员表 order by 序号",DBCON, adOpenKeyset, adLockOptimistic
RsParty里的姓名有18个,我要怎么一个一个取出来用IF来判断呀,比较说有个TextBox.text = "123"
For j = RsParty.RecordCount To 2 Step -1
if TextBox.text = RsParty-->里18个名字里一一比对出来then
.....有什么办法呀~~!谢谢了!
2.
For j = 0 To RsParty.RecordCount-1
If TextBox.Text = RsParty.Fields("字段名称或者是序号") Then
'添加代码
End If
RsParty.Move(j)
Next或者RsParty.MoveFirst
Do Until RsParty.EOF
If TextBox.Text = RsParty.Fields("字段名称或者是序号") Then
'添加代码
End If
RsParty.MoveNext
Loop
有可能你是 frmChild.Show 1或者frmChild.Show VbModal
将后面的参数去掉。
'=======================取的党员两违表行数=======================
myRow1 = Sheets("党员两违").[a65536].End(xlUp).Row
'=======================取的党员姓名表行数=======================
ModPublic.RsParty.Open "select * from 党员表 order by 序号", ModPublic.DBCON, adOpenKeyset, adLockOptimistic
myRow2 = ModPublic.RsParty.RecordCount
For i = myRow1 To 2 Step -1
For j = myRow2 To 2 Step -1
If Sheets("党员两违").Cells(i, 25).Value Like "*" + ModPublic.RsParty.Fields("姓名") + "*" Then
Cells(i, 25).EntireRow.Delete
End If
ModPublic.RsParty.Move (j)
Next
Next
End Sub会提示:BOF 或EOF中有一个是“真”,或者当前的记录已删除,所需的操作要求一个当前的记录。
RsParty.MoveFirst
Do Until RsParty.EOF
If TextBox.Text = RsParty.Fields("字段名称或者是序号") Then
'添加代码
End If
RsParty.MoveNext
Loop
用这个可以了~~感谢~~!