Private Sub Form_Load()Set rs = con.Execute("select * from t_landrent")
MsgBox getMaxId()
If rs.RecordCount > 0 Then
rs.MoveFirst
displayInfo
Else
Command2(0).SetFocus
End IfMsgBox "form1 load!!!"
End Sub
MsgBox getMaxId()
If rs.RecordCount > 0 Then
rs.MoveFirst
displayInfo
Else
Command2(0).SetFocus
End IfMsgBox "form1 load!!!"
End Sub
Command2(0).SetFocus
End Sub
Command2(0).SetFocus
End Sub
Command2(0).SetFocus
End Sub
MsgBox getMaxId()
If rs.RecordCount > 0 Then
rs.MoveFirst
displayInfo
Else
'Command2(0).SetFocus '此时控件还不可见,当然不行
Command2(0).TabIndex = 0
End IfMsgBox "form1 load!!!"
End Sub
??