VERSION 5.00
Begin VB.Form Form2
Caption
=
"Form2"
ClientHeight
=
4245
ClientLeft
=
60
ClientTop
=
465
ClientWidth
=
8115
LinkTopic
=
"Form2"
ScaleHeight
=
4245
ScaleWidth
=
8115
StartUpPosition =
3
'窗口缺省
Begin Combo4
Height
=
300
Left
=
2040
TabIndex
=
15
Top
=
1800
Width
=
2775
End
Begin Combo3
Height
=
300
Left
=
3840
TabIndex
=
14
Text
=
"Combo3"
Top
=
1320
Width
=
855
End
Begin Combo2
Height
=
300
Left
=
3000
TabIndex
=
13
Text
=
"Combo2"
Top
=
1320
Width
=
495
End
Begin Combo1
Height
=
300
Left
=
1920
TabIndex
=
12
Top
=
1320
Width
=
735
End
Begin Command2
Caption
=
"取消"
Height
=
375
Left
=
3480
TabIndex
=
11
Top
=
3720
Width
=
1095
End
Begin VB.TextBox Text6
Height
=
495
Left
=
2040
TabIndex
=
9
Top
=
3000
Width
=
2775
End
Begin Command1
Caption
=
"保存"
Height
=
495
Left
=
1680
TabIndex
=
3
Top
=
3600
Width
=
1455
End
Begin VB.TextBox Text5
Height
=
375
Left
=
2040
TabIndex
=
2
Text
=
"0"
Top
=
2520
Width
=
2775
End
Begin VB.TextBox Text2
Height
=
375
Left
=
2040
TabIndex
=
1
Top
=
720
Width
=
2655
End
Begin VB.TextBox Text1
Enabled
=
0
'False
Height
=
495
Left
=
2040
TabIndex
=
0
Top
=
120
Width
=
2655
End
Begin VB.Label Label8
Caption
=
"如:13812345678"
Height
=
375
Left
=
5160
TabIndex
=
17
Top
=
3120
Width
=
1455
End
Begin VB.Label Label7
Caption
=
"如:1000"
Height
=
375
Left
=
5280
TabIndex
=
16
Top
=
2520
Width
=
975
End
Begin VB.Label Label6
Caption
=
"电话"
Height
=
255
Left
=
600
TabIndex
=
10
Top
=
3240
Width
=
735
End
Begin VB.Label Label5
Caption
=
"消费额"
Height
=
375
Left
=
600
TabIndex
=
8
Top
=
2520
Width
=
975
End
Begin VB.Label Label4
Caption
=
"客户类型"
Height
=
375
Left
=
600
TabIndex
=
7
Top
=
1920
Width
=
975
End
Begin VB.Label Label3
Caption
=
"生日"
Height
=
375
Left
=
480
TabIndex
=
6
Top
=
1320
Width
=
855
End
Begin VB.Label Label2
Caption
=
"姓名"
Height
=
375
Left
=
480
TabIndex
=
5
Top
=
720
Width
=
735
End
Begin VB.Label Label1
Caption
=
"客户代号"
Height
=
495
Left
=
480
TabIndex
=
4
Top
=
120
Width
=
855
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim birthday As String
birthday = Combo1.Text & "-" & Combo2.Text & "-" & Combo3.Text
strSQL = "insert into
[user](userid,name,birthday,type,qian,tel) values(" & Text1.Text & ",'" & Text2.Text & "','" & birthday & "','" & Combo4.Text & "'," & Val(Text5.Text) & ",'" & Text6.Text & "')"
Set rs = conn.Execute(strSQL)
Form1.init
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
strSQL = "select top 1 userid
from
[user] order by userid desc"
Set rs = conn.Execute(strSQL)
Text1.Text = rs("userid") + 1
rs.Close
Combo1.Text = "1949": Combo2.Text = "1": Combo3.Text = "1"
For i = 1950 To 2008
Combo1.AddItem i
Next
For i = 2 To 12
Combo2.AddItem i
Next
For i = 2 To 31
Combo3.AddItem i
Next
Combo4.Text = "普通客户"
Combo4.AddItem "高级客户"
Combo4.AddItem "vip客户"
End Sub
不知道这答案对吗?请各路高手看一下。