⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmhotlfind.frm

📁 VB餐馆查询系统 一个很不错的系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Top             =   840
         Width           =   1815
      End
      Begin VB.TextBox txtFill 
         Height          =   270
         Index           =   2
         Left            =   4320
         TabIndex        =   8
         Top             =   360
         Width           =   1815
      End
      Begin VB.TextBox txtFill 
         Height          =   270
         Index           =   1
         Left            =   1320
         TabIndex        =   7
         Top             =   840
         Width           =   1935
      End
      Begin VB.TextBox txtFill 
         Height          =   270
         Index           =   0
         Left            =   1320
         TabIndex        =   6
         Top             =   360
         Width           =   1935
      End
      Begin VB.Label lbFill 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "元以上"
         Height          =   180
         Index           =   1
         Left            =   4680
         TabIndex        =   13
         Top             =   1320
         Width           =   540
      End
      Begin VB.Label lbFill 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "元以下"
         Height          =   180
         Index           =   0
         Left            =   2520
         TabIndex        =   12
         Top             =   1320
         Width           =   540
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "所在地址"
         Height          =   180
         Index           =   4
         Left            =   3480
         TabIndex        =   5
         Top             =   840
         Width           =   720
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "菜系"
         Height          =   180
         Index           =   3
         Left            =   3600
         TabIndex        =   4
         Top             =   360
         Width           =   360
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "人均消费"
         Height          =   180
         Index           =   2
         Left            =   360
         TabIndex        =   3
         Top             =   1320
         Width           =   720
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "所在城市"
         Height          =   180
         Index           =   1
         Left            =   360
         TabIndex        =   2
         Top             =   840
         Width           =   720
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "餐馆名称"
         Height          =   180
         Index           =   0
         Left            =   360
         TabIndex        =   1
         Top             =   360
         Width           =   720
      End
   End
End
Attribute VB_Name = "frmHotlFind"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim Cnn As ADODB.Recordset
Dim Cn As String
Dim Cnn1 As ADODB.Recordset
Dim Cn1 As String

Private Sub cmdExit_Click()
    If MsgBox("是否真的退出该系统?", vbOKCancel + vbQuestion, "退出系统") = vbOK Then
        Unload Me
    Else
        Exit Sub
    End If
End Sub

Private Sub cmdFindRecodset_Click()
    Dim i As Integer
    Dim x As Integer
    Dim A As ADODB.Recordset
    Dim B As ADODB.Recordset
    Dim A1 As String
    Dim A2 As String
    Dim B1 As String
    Set A = New Recordset

    A1 = "select * from restaurantinfo where restName='" & txtFill(0).Text & "'"
    A.Open A1, Str, adOpenKeyset, adLockOptimistic, adCmdText
    
    Set B = New Recordset
    
    B1 = "select * from contactinfo "
    B.Open B1, Str, adOpenKeyset, adLockOptimistic, adCmdText
    
    If A.EOF And A.BOF Then
        For i = 1 To 5
            LbRecodset(i) = ""
        Next
        For x = 0 To 1
            LbRecodset1(x) = ""
        Next
        LbFindAll.Visible = False
        cmdFrist.Visible = False
        cmdNext.Visible = False
    Else
        LbFindAll.Visible = True
        cmdFrist.Visible = True
        cmdNext.Visible = True
        For i = 1 To 5
            LbRecodset(i) = A(i)
        Next
        LbRecodset1(0) = B("restAddr")
        LbRecodset1(1) = B("restRegion")
    End If
    
    Set A = Nothing
    Set B = Nothing
    

End Sub

Private Sub cmdFrist_Click()
    Dim i As Integer
    Dim A As ADODB.Recordset
    Dim B As ADODB.Recordset
    Dim A1 As String
    Dim B1 As String
    Set A = New Recordset
    A1 = "select * from restaurantinfo where restName='" & txtFill(0).Text & "'"
    A.Open A1, Str, adOpenKeyset, adLockOptimistic, adCmdText
    
    Set B = New Recordset
    B1 = "select * from contactinfo "
    B.Open B1, Str, adOpenKeyset, adLockOptimistic, adCmdText
    
    A.MovePrevious
    B.MovePrevious
    
    If A.BOF = True Then
        A.MoveFirst
    End If
    If B.BOF = True Then
        B.MoveFirst
    End If
    
    For i = 1 To 5
        LbRecodset(i) = A(i)
    Next
    LbRecodset1(0) = B("restAddr")
    LbRecodset1(1) = B("restRegion")
    
    Set A = Nothing
    Set B = Nothing
    
End Sub

Private Sub cmdNext_Click()
    Dim i As Integer
    Dim A As ADODB.Recordset
    Dim B As ADODB.Recordset
    Dim A1 As String
    Dim B1 As String
    Set A = New Recordset
    A1 = "select * from restaurantinfo where restName='" & txtFill(0).Text & "'"
    A.Open A1, Str, adOpenKeyset, adLockOptimistic, adCmdText
    
    Set B = New Recordset
    B1 = "select * from contactinfo "
    B.Open B1, Str, adOpenKeyset, adLockOptimistic, adCmdText
    
    A.MoveNext
    B.MoveNext
    
    If A.BOF = True Then
        A.MoveLast
    End If
    If B.BOF = True Then
        B.MoveLast
    End If
    
    For i = 1 To 5
        LbRecodset(i) = A(i)
    Next
    LbRecodset1(0) = B("restAddr")
    LbRecodset1(1) = B("restRegion")
    
    Set A = Nothing
    Set B = Nothing
End Sub

Private Sub Form_Load()
    Set Cnn = New Recordset
    Cn = "select * from restaurantinfo "
    Cnn.Open Cn, Str, adOpenKeyset, adLockOptimistic, adCmdText
    
    Set Cnn1 = New Recordset
    Cn1 = "select * from contactinfo "
    Cnn1.Open Cn1, Str, adOpenKeyset, adLockOptimistic, adCmdText
    
End Sub

Private Sub LbFindAll_Click()
    frmShow.Show
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -