Private Sub Form_Load()
Label2.Visible = False
Txt_cxnr.Visible = False
Command1.Visible = False
Me.MSFlexGrid1.ColAlignment(0) = flexAlignCenterCenter
Me.MSFlexGrid1.ColWidth(0) = 1800
Me.MSFlexGrid1.ColWidth(1) = 1000
'Me.MSFlexGrid1.ColWidth(2) = 4500
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
Case 3
MoveFirst Me.MSFlexGrid1
Me.StatusBar1.Panels(1).Text = "总共有" & Me.MSFlexGrid1.Rows - 1 & "条记录"
Case 4
MovePre Me.MSFlexGrid1
Me.StatusBar1.Panels(1).Text = "总共有" & Me.MSFlexGrid1.Rows - 1 & "条记录"
Case 5
MoveNext Me.MSFlexGrid1
Me.StatusBar1.Panels(1).Text = "总共有" & Me.MSFlexGrid1.Rows - 1 & "条记录"
Case 6
MoveLast Me.MSFlexGrid1
Me.StatusBar1.Panels(1).Text = "总共有" & Me.MSFlexGrid1.Rows - 1 & "条记录"
Case 8
Frm_tscx.Refresh
Case 9
Unload Me
End Select
End Sub
3.4.5 用户登录界面代码设计
Private Sub cmb_qx_Click()
On Error GoTo lab
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim sql As String
sql = "select * from 用户 where 用户权限='" + cmb_qx.Text + "'"
cnn.Open strcnn
rst.Open sql, cnn, 3, 1
cmb_yhm.Clear
Do While Not rst.EOF
cmb_yhm.AddItem rst!用户名
rst.MoveNext
Loop
rst.Close
cnn.Close
Exit Sub
lab:
MsgBox "请您先附加数据库!", vbExclamation, "提示"
End Sub
Private Sub Command1_Click()
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim sql As String
<< 上一页 [11] [12] [13] [14] [15] [16] 下一页