?? youkezixun.frm
字號:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form youkezixun1
Caption = "游客咨詢登記"
ClientHeight = 7440
ClientLeft = 60
ClientTop = 465
ClientWidth = 10260
LinkTopic = "Form1"
ScaleHeight = 7440
ScaleWidth = 10260
StartUpPosition = 3 '窗口缺省
Begin MSComCtl2.DTPicker DTPicker1
Height = 375
Left = 6600
TabIndex = 13
Top = 600
Width = 2775
_ExtentX = 4895
_ExtentY = 661
_Version = 393216
Format = 25493505
CurrentDate = 39225
End
Begin VB.CommandButton Command2
BackColor = &H0000FF00&
Caption = "退出"
BeginProperty Font
Name = "華文行楷"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 7800
Style = 1 'Graphical
TabIndex = 12
Top = 2280
Width = 1695
End
Begin VB.CommandButton Command1
BackColor = &H0000FF00&
Caption = "保存"
BeginProperty Font
Name = "華文行楷"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 5400
Style = 1 'Graphical
TabIndex = 11
Top = 2280
Width = 1695
End
Begin VB.TextBox Text5
Height = 495
Left = 2280
TabIndex = 10
Top = 2520
Width = 2295
End
Begin VB.TextBox Text4
Height = 495
Left = 2280
TabIndex = 9
Top = 1800
Width = 2295
End
Begin VB.TextBox Text3
Height = 375
Left = 6720
TabIndex = 8
Top = 1320
Width = 2295
End
Begin VB.TextBox Text2
Height = 375
Left = 2280
TabIndex = 4
Top = 1080
Width = 2295
End
Begin VB.TextBox Text1
Height = 375
Left = 2280
TabIndex = 1
Top = 360
Width = 2295
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "備注"
BeginProperty Font
Name = "隸書"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 255
Left = 960
TabIndex = 7
Top = 2640
Width = 615
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "旅游意向"
BeginProperty Font
Name = "隸書"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 255
Left = 840
TabIndex = 6
Top = 1800
Width = 975
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "咨詢內(nèi)容"
BeginProperty Font
Name = "隸書"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 255
Left = 5160
TabIndex = 5
Top = 1440
Width = 975
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "聯(lián)系方式"
BeginProperty Font
Name = "隸書"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 255
Left = 840
TabIndex = 3
Top = 1080
Width = 1095
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "咨詢?nèi)掌?quot;
BeginProperty Font
Name = "隸書"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 255
Left = 5160
TabIndex = 2
Top = 600
Width = 975
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "游客姓名"
BeginProperty Font
Name = "隸書"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 255
Left = 840
TabIndex = 0
Top = 360
Width = 975
End
End
Attribute VB_Name = "youkezixun1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public rs As New ADODB.Connection, cn As New ADODB.Connection
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
cn.ConnectionString = "Driver={SQL Server};SERVER=DDK;DATABASE=lvxingshe"
cn.Open
'MsgBox "連接成功"
DTPicker1.Value = Format(Now(), "yyyy-mm-dd")
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
On Error Resume Next
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
End Sub
Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0
End Sub
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "請輸入游客姓名!", vbOKOnly, "提示"
Text1.SetFocus
Exit Sub
ElseIf Text4.Text = "" Then
MsgBox "請輸入旅游意向", vbOKOnly, "提示"
Text4.SetFocus
Exit Sub
Else
cn.Execute "insert into youkezixun(name,riqi,telephone,zixunneirong,lvyouyixiang,beizhu) values('" & Text1.Text & "','" & DTPicker1.Value & "','" & Text2.Text & "','" & Text3.Text & "','" & Text4.Text & "','" & Text5.Text & "')"
MsgBox "操作成功!", vbOKOnly, "提示"
End If
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -