📄 frmisdsearch.frm
字号:
VERSION 5.00
Begin VB.Form Form6
BackColor = &H00FFFFFF&
BorderStyle = 0 'None
Caption = "Form6"
ClientHeight = 3195
ClientLeft = 0
ClientTop = -105
ClientWidth = 4680
LinkTopic = "Form6"
ScaleHeight = 3195
ScaleWidth = 4680
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
WindowState = 2 'Maximized
Begin VB.Frame Frame1
BackColor = &H00C0E0FF&
ForeColor = &H00000000&
Height = 3375
Left = 600
TabIndex = 2
Top = 3480
Width = 13095
Begin VB.OptionButton Option1
BackColor = &H00C0E0FF&
Caption = "State Name"
Height = 255
Left = 3840
TabIndex = 8
Top = 840
Value = -1 'True
Width = 1215
End
Begin VB.OptionButton Option2
BackColor = &H00C0E0FF&
Caption = "State Code"
Height = 255
Left = 5520
TabIndex = 7
Top = 840
Width = 1695
End
Begin VB.TextBox Text1
Height = 375
Left = 6960
TabIndex = 6
Top = 1560
Width = 2775
End
Begin VB.CommandButton Command3
BackColor = &H00C0FFC0&
Caption = "Home"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 7680
Picture = "FrmISDSearch.frx":0000
Style = 1 'Graphical
TabIndex = 5
Top = 2640
Width = 1935
End
Begin VB.CommandButton Command1
BackColor = &H00C0FFC0&
Caption = "Search"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 3360
Picture = "FrmISDSearch.frx":29C12
Style = 1 'Graphical
TabIndex = 4
Top = 2640
Width = 1935
End
Begin VB.CommandButton Command2
BackColor = &H00C0FFC0&
Caption = "Reset"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 5520
Picture = "FrmISDSearch.frx":53824
Style = 1 'Graphical
TabIndex = 3
Top = 2640
Width = 1935
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "View All ISD Codes"
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 400
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C000C0&
Height = 240
Left = 9720
MouseIcon = "FrmISDSearch.frx":7D436
MousePointer = 99 'Custom
TabIndex = 12
Top = 360
Width = 1695
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Search By : "
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 2520
TabIndex = 11
Top = 840
Width = 1155
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Enter State Name or Code :"
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 4440
TabIndex = 10
Top = 1560
Width = 2415
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "( Do not put Zero Before the State Code )"
BeginProperty Font
Name = "Arial"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 5760
TabIndex = 9
Top = 2160
Width = 3030
End
End
Begin VB.Frame Frame2
BackColor = &H00C0FFC0&
Caption = "Search Result"
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3615
Left = 600
TabIndex = 0
Top = 7080
Visible = 0 'False
Width = 13095
Begin VB.Image Image2
Height = 2730
Left = 120
Picture = "FrmISDSearch.frx":7D740
Stretch = -1 'True
Top = 840
Width = 2820
End
Begin VB.Label Label7
BackColor = &H00008000&
Caption = "Label7"
BeginProperty Font
Name = "Arial"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 2895
Left = 3720
TabIndex = 1
Top = 480
Width = 7695
WordWrap = -1 'True
End
End
Begin VB.Image Image1
Height = 2100
Left = 6480
Picture = "FrmISDSearch.frx":9D732
Top = 0
Width = 2520
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Grahambell Telephone Directory"
BeginProperty Font
Name = "Arial Black"
Size = 27.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000C0&
Height = 780
Left = 2640
TabIndex = 14
Top = 2040
Width = 10320
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "I S D Code Search"
BeginProperty Font
Name = "Arial Black"
Size = 26.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 750
Left = 4560
TabIndex = 13
Top = 2760
Width = 5400
End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim db As Database, rs As Recordset
Private Sub Command1_Click()
If Option1.Value = True And Text1.Text <> "" Then
Set rs = db.OpenRecordset("Select * from ISD where country = '" & StrConv(Trim(Text1.Text), vbProperCase) & "'")
If rs.RecordCount <> 0 Then
Frame2.Visible = True
Label7.Caption = "The ISD Code for " & rs(0) & " is " & rs(1)
Else
Frame2.Visible = True
Label7.Caption = "Please type the correct country name"
End If
ElseIf Option2.Value = True And Text1.Text <> "" Then
Set rs = db.OpenRecordset("Select * from ISD where code = " & Val(Text1.Text))
If rs.RecordCount <> 0 Then
rs.MoveLast
Frame2.Visible = True
rs.MoveFirst
Label7.Caption = "The Country Name for the ISD Code - " & rs(1) & " is " & vbCrLf
While rs.EOF <> True
Label7.Caption = Label7.Caption & rs(0) & ", "
rs.MoveNext
Wend
Else
Frame2.Visible = True
Label7.Caption = "Please type the correct ISD Code"
End If
Else
MsgBox "Enter Country Name or ISD Code", vbInformation
End If
End Sub
Private Sub Command2_Click()
Option1.Value = True
Text1.Text = ""
Frame2.Visible = False
End Sub
Private Sub Command3_Click()
Unload Me
Form1.Show
End Sub
Private Sub Form_Load()
Set db = OpenDatabase(App.Path & "\Database\DirDB.mdb")
End Sub
Private Sub Label3_Click()
Unload Me
Form9.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -