?? delform.frm
字號:
VERSION 5.00
Begin VB.Form DelForm
AutoRedraw = -1 'True
BorderStyle = 3 'Fixed Dialog
Caption = "刪除過時的展會"
ClientHeight = 4725
ClientLeft = 45
ClientTop = 330
ClientWidth = 8115
ControlBox = 0 'False
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 4725
ScaleWidth = 8115
ShowInTaskbar = 0 'False
Begin VB.ComboBox Combo1
BackColor = &H00FFFFC0&
ForeColor = &H00C00000&
Height = 300
Left = 3990
Style = 2 'Dropdown List
TabIndex = 29
Top = 435
Width = 3795
End
Begin VB.Frame Frame1
Caption = "Delet Fair Data"
ForeColor = &H00004040&
Height = 870
Left = 315
TabIndex = 15
Top = 285
Width = 2370
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "刪除展覽會"
BeginProperty Font
Name = "宋體"
Size = 20.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 405
Index = 1
Left = 165
TabIndex = 16
Top = 315
Width = 2100
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "刪除展覽會"
BeginProperty Font
Name = "宋體"
Size = 20.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00808080&
Height = 405
Index = 0
Left = 165
TabIndex = 17
Top = 330
Width = 2100
End
End
Begin VB.PictureBox Picture1
AutoRedraw = -1 'True
BorderStyle = 0 'None
Height = 510
Left = 5175
ScaleHeight = 510
ScaleWidth = 2625
TabIndex = 14
Top = 3945
Width = 2625
Begin VB.CommandButton OK
Caption = "刪除(&D)"
Height = 405
Left = 30
TabIndex = 0
ToolTipText = "刪除當前的展會"
Top = 30
Width = 1230
End
Begin VB.CommandButton QX
Cancel = -1 'True
Caption = "取消(&C)"
Height = 405
Left = 1320
TabIndex = 1
ToolTipText = "放棄刪除"
Top = 30
Width = 1230
End
End
Begin VB.TextBox FieldTxt
Enabled = 0 'False
Height = 285
Index = 1
Left = 3990
MaxLength = 40
TabIndex = 13
Top = 855
Width = 3795
End
Begin VB.TextBox FieldTxt
Enabled = 0 'False
Height = 285
Index = 2
Left = 1185
MaxLength = 10
TabIndex = 12
Top = 1470
Width = 2745
End
Begin VB.TextBox FieldTxt
Enabled = 0 'False
Height = 285
Index = 3
Left = 1185
MaxLength = 5
TabIndex = 11
Top = 1860
Width = 780
End
Begin VB.TextBox FieldTxt
Enabled = 0 'False
Height = 285
Index = 4
Left = 1185
MaxLength = 30
TabIndex = 10
Top = 2265
Width = 2745
End
Begin VB.TextBox FieldTxt
Enabled = 0 'False
Height = 285
Index = 5
Left = 1185
MaxLength = 50
TabIndex = 9
Top = 2640
Width = 2745
End
Begin VB.TextBox FieldTxt
Enabled = 0 'False
Height = 285
Index = 6
Left = 1185
MaxLength = 50
TabIndex = 8
Top = 3015
Width = 2745
End
Begin VB.TextBox FieldTxt
Enabled = 0 'False
Height = 285
Index = 7
Left = 1185
MaxLength = 80
TabIndex = 7
Top = 3390
Width = 2745
End
Begin VB.TextBox FieldTxt
Enabled = 0 'False
Height = 285
Index = 8
Left = 1185
MaxLength = 80
TabIndex = 6
Top = 3765
Width = 2745
End
Begin VB.TextBox FieldTxt
Enabled = 0 'False
Height = 285
Index = 10
Left = 3060
MaxLength = 2
TabIndex = 5
Top = 1860
Width = 855
End
Begin VB.TextBox FieldTxt
Enabled = 0 'False
Height = 285
Index = 11
Left = 1185
MaxLength = 30
TabIndex = 4
Top = 4140
Width = 2745
End
Begin VB.Frame Frame2
Height = 1920
Left = 4110
TabIndex = 2
Top = 1665
Width = 3690
Begin VB.TextBox FieldTxt
Enabled = 0 'False
Height = 1650
Index = 9
Left = 90
MaxLength = 125
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 3
Top = 180
Width = 3495
End
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "展 出 內(nèi) 容"
ForeColor = &H00800080&
Height = 180
Left = 5670
TabIndex = 30
Top = 1440
Width = 990
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "展會名稱:"
Height = 180
Left = 3060
TabIndex = 28
Top = 495
Width = 900
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "展出地點:"
Height = 180
Left = 3060
TabIndex = 27
Top = 885
Width = 900
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "展出時間:"
Height = 180
Left = 270
TabIndex = 26
Top = 1515
Width = 900
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "聯(lián)系人:"
Height = 180
Left = 465
TabIndex = 25
Top = 1920
Width = 720
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "單位:"
Height = 180
Left = 630
TabIndex = 24
Top = 2310
Width = 540
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "電話:"
Height = 180
Left = 630
TabIndex = 23
Top = 2670
Width = 540
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "傳真:"
Height = 180
Left = 630
TabIndex = 22
Top = 3045
Width = 540
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "郵件:"
Height = 180
Left = 630
TabIndex = 21
Top = 3420
Width = 540
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "網(wǎng)址:"
Height = 180
Left = 630
TabIndex = 20
Top = 3780
Width = 540
End
Begin VB.Label Label12
AutoSize = -1 'True
Caption = "天數(shù):"
Height = 180
Left = 2505
TabIndex = 19
Top = 1920
Width = 540
End
Begin VB.Label Label13
AutoSize = -1 'True
Caption = "地址:"
Height = 180
Left = 630
TabIndex = 18
Top = 4155
Width = 540
End
End
Attribute VB_Name = "DelForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Click()
Dim Db As Database, Ef As Recordset, X As Integer, TempStr As String
Set Db = OpenDatabase(Browser + "Fair.mdb")
Set Ef = Db.OpenRecordset("Fair", dbOpenDynaset)
TempStr = "展會名稱='" & Combo1.Text & "'"
Ef.FindFirst TempStr
For X = 1 To 11
If Not IsNull(Ef.Fields(X).Value) Then
TempStr = Ef.Fields(X).Value
End If
FieldTxt(X).Text = TempStr
Next
Db.Close
End Sub
Private Sub Form_Load()
DelForm.Left = Menu.Width
DelForm.Top = Menu.Height - DelForm.Height
Dim Db As Database, Ef As Recordset, X As Integer, Y As Integer, TempStr As String
Set Db = OpenDatabase(Browser + "Fair.mdb")
Set Ef = Db.OpenRecordset("Fair", dbOpenTable)
Y = Ef.RecordCount
Set Ef = Db.OpenRecordset("Fair", dbOpenDynaset)
For X = 0 To Y - 1
If Not IsNull(Ef.Fields(0).Value) Then
TempStr = Ef.Fields(0).Value
End If
Combo1.AddItem TempStr, X
Ef.MoveNext
Next
Db.Close
On Error GoTo ErrCom
Combo1.ListIndex = 0
Exit Sub
ErrCom:
Exit Sub
End Sub
Private Sub OK_Click()
If Combo1.Text = "" Then Exit Sub
Dim OkD As Integer
OkD = MsgBox("真的要刪除[ " & Combo1.Text & " ]展會嗎(Y/N)?", vbYesNo + 16, "提示:")
If OkD = 6 Then
Dim Db As Database, TempStr As String, X As Integer, Y As Integer
Set Db = OpenDatabase(Browser + "Fair.mdb")
TempStr = "展會名稱='" & Combo1.Text & "'"
TempStr = "Delete * From Fair Where " & TempStr
Db.Execute TempStr
Set Ef = Db.OpenRecordset("Fair", dbOpenTable)
For X = 1 To 11
FieldTxt(X).Text = ""
Next
Y = Ef.RecordCount
Set Ef = Db.OpenRecordset("Fair", dbOpenDynaset)
Combo1.Clear
For X = 0 To Y - 1
If Not IsNull(Ef.Fields(0).Value) Then
TempStr = Ef.Fields(0).Value
End If
Combo1.AddItem TempStr, X
Ef.MoveNext
Next
Db.Close
On Error GoTo ErrFair
Combo1.ListIndex = 0
Else
Exit Sub
End If
Exit Sub
ErrFair:
Exit Sub
End Sub
Private Sub QX_Click()
Unload Me
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -