g = g_ConnStr
Conn.Open
End With
'从数据库中读取数据写入会员编号下拉
列表框
Dim adoMemIDRs As New ADODB.Recordset
Dim DBStr As String
DBStr = "select MemberID from MemberInfo"
adoMemIDRs.Open DBStr, g_DBConn, adOpenStatic, adLockReadOnly
If adoMemIDRs.RecordCount > 0 Then
adoMemIDRs.MoveFirst
Do While Not adoMemIDRs.EOF
CombMemberID.AddItem adoMemIDRs.Fields(0).Value
adoMemIDRs.MoveNext
Loop
End If
adoMemIDRs.Close
Set adoMemIDRs = Nothing
Dim SqlStr As String
Dim rsMember As New Recordset
SqlStr = "select MemberID as 会员编号,MemberName as 会员,Tel1 as 电话,Tel2 as 手机,Address as 地址,SignCheck as 签单额度,ConsumedTime as 消费次数," & "ConsumedIntegral as 消费积分,Remake as 备注 from MemberInfo"
Set rsMember = Conn.Execute(SqlStr)
Me.DataGrid1.ColumnHeaders = True
Set DataGrid1.DataSource = rsMember
Set rsMember = Nothing
End Sub