【VB开源代码栏目提醒】:网学会员,鉴于大家对VB开源代码十分关注,论文会员在此为大家搜集整理了“FMPOSA_FIND_BMEM.frm”一文,供大家参考学习!
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form FMPOSA_FIND_BMEM
Caption = "查询会员"
ClientHeight = 6195
ClientLeft = 60
ClientTop = 345
ClientWidth = 10110
LinkTopic = "Form1"
ScaleHeight = 6195
ScaleWidth = 10110
StartUpPosition = 2 '屏幕中心
Begin MSFlexGridLib.MSFlexGrid GRID_BMEM
Height = 6135
Left = 0
TabIndex = 0
Top = 0
Width = 10095
_ExtentX = 17806
_ExtentY = 10821
_Version = 393216
Rows = 100
Cols = 5
SelectionMode = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 15.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
End
Attribute VB_Name = "FMPOSA_FIND_BMEM"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public CN As New ADODB.Connection, RS As New ADODB.Recordset
Public SQL As String
Const DBPATH = "./POS.MDB"
Const ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DBPATH
Private Sub Form_Activate()
GRID_BMEM.SetFocus
GRID_BMEM.ColWidth(0) = 1000
GRID_BMEM.ColWidth(1) = 2000
GRID_BMEM.ColWidth(2) = 1200
GRID_BMEM.ColWidth(3) = 1500
GRID_BMEM.ColWidth(4) = 4000
GRID_BMEM.TextMatrix(0, 0) = "编号"
GRID_BMEM.TextMatrix(0, 1) = ""
GRID_BMEM.TextMatrix(0, 2) = "年消费"
GRID_BMEM.TextMatrix(0, 3) = "电话"
GRID_BMEM.TextMatrix(0, 4) = "地址"
CN.Open ConnString
SQL = "SELECT * FROM BMEM "
SQL = SQL & "WHERE BMENO LIKE '%" & FMPOSA.INPUT_ENTER.Text & "%' "
RS.Open SQL, ConnString, , , adCmdText
I = 0
While Not RS.EOF
I = I + 1
If Len(RS("BMENO")) >= 1 Then
GRID_BMEM.TextMatrix(I, 0) = RS("BMENO")
End If
If Len(RS("BMNAM")) >= 1 Then
GRID_BMEM.TextMatrix(I, 1) = RS("BMNAM")
End If
If Len(RS("BMBYR")) >= 1 Then
GRID_BMEM.TextMatrix(I, 2) = RS("BMBYR")
End If
If Len(RS("BMTL1")) >= 1 Then
GRID_BMEM.TextMatrix(I, 3) = RS("BMTL1")
End If
If Len(RS("BMAD1")) >= 1 Then
GRID_BMEM.TextMatrix(I, 4) = RS("BMAD1")
End If
RS.MoveNext
Wend
RS.Close
CN.Close
End Sub
Private Sub GRID_BMEM_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
FMPOSA.INPUT_ENTER.Text = GRID_BMEM.TextMatrix(GRID_BMEM.Row, 0)
Unload FMPOSA_FIND_BMEM
End If
End Sub
上一篇:
About1.pas
下一篇:
4种小菜缓解孕妈咪不适