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

📄 frmsignup.frm

📁 project on Video rental system
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmSignup 
   BackColor       =   &H00FF0000&
   Caption         =   "Signing Up"
   ClientHeight    =   7080
   ClientLeft      =   2355
   ClientTop       =   675
   ClientWidth     =   6840
   ForeColor       =   &H00FF0000&
   LinkTopic       =   "Form2"
   ScaleHeight     =   7080
   ScaleWidth      =   6840
   Begin VB.Frame Frame1 
      BackColor       =   &H00FF0000&
      Caption         =   "Member Particulars"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   15.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   3735
      Left            =   480
      TabIndex        =   6
      Top             =   2280
      Width           =   5895
      Begin VB.TextBox txtField 
         Height          =   375
         Index           =   1
         Left            =   2640
         TabIndex        =   0
         ToolTipText     =   "Please enter name "
         Top             =   480
         Width           =   2775
      End
      Begin VB.TextBox txtField 
         Height          =   375
         Index           =   3
         Left            =   2640
         MaxLength       =   6
         TabIndex        =   2
         ToolTipText     =   "Please enter postal code"
         Top             =   2400
         Width           =   2775
      End
      Begin VB.TextBox txtField 
         Height          =   375
         Index           =   4
         Left            =   2640
         MaxLength       =   8
         TabIndex        =   3
         ToolTipText     =   "Please enter phone number"
         Top             =   3120
         Width           =   2775
      End
      Begin VB.TextBox txtField 
         Height          =   855
         Index           =   2
         Left            =   2640
         MultiLine       =   -1  'True
         TabIndex        =   1
         ToolTipText     =   "Please enter address "
         Top             =   1200
         Width           =   2775
      End
      Begin VB.Label Label2 
         BackColor       =   &H00FF0000&
         Caption         =   "Address:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   480
         TabIndex        =   11
         Top             =   1200
         Width           =   1215
      End
      Begin VB.Label Label3 
         BackColor       =   &H00FF0000&
         Caption         =   "Postal Code:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   480
         TabIndex        =   10
         Top             =   2400
         Width           =   1695
      End
      Begin VB.Label Label4 
         BackColor       =   &H00FF0000&
         Caption         =   "Phone Number:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   480
         TabIndex        =   9
         Top             =   3120
         Width           =   2055
      End
      Begin VB.Label label1 
         BackColor       =   &H00FF0000&
         Caption         =   "Name: "
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   480
         TabIndex        =   8
         Top             =   480
         Width           =   735
      End
   End
   Begin VB.CommandButton cmdclearfrm 
      Caption         =   "&Clear All"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   4800
      TabIndex        =   7
      ToolTipText     =   "Clear all details"
      Top             =   6360
      Width           =   1215
   End
   Begin VB.CommandButton cmdback 
      Caption         =   "&Back"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2880
      TabIndex        =   5
      ToolTipText     =   "Cancel the registration"
      Top             =   6360
      Width           =   1215
   End
   Begin VB.CommandButton cmdSubmit 
      Caption         =   "&Submit"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   960
      TabIndex        =   4
      ToolTipText     =   "Submit the registration"
      Top             =   6360
      Width           =   1095
   End
   Begin VB.Label Label6 
      Alignment       =   2  'Center
      BackColor       =   &H00FF0000&
      Caption         =   "Millenium Video Store"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   26.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   735
      Left            =   720
      TabIndex        =   13
      Top             =   360
      Width           =   5295
   End
   Begin VB.Label Label5 
      Alignment       =   2  'Center
      BackColor       =   &H00FF0000&
      Caption         =   "Point-of-sale system"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   26.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   615
      Left            =   1080
      TabIndex        =   12
      Top             =   1080
      Width           =   4695
   End
End
Attribute VB_Name = "frmSignup"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Dim mbEditFlag As Boolean
Dim mbAddnewFlag As Boolean
Private Sub cmdBack_Click()
Dim ans As Integer

ans = MsgBox("Go back to the main form?", vbYesNo)
    If ans = vbYes Then
     Unload Me
     frmMain.Show
     
End If
End Sub
Private Sub cmdclearfrm_Click()
 Dim i As Integer
   For i = 1 To 4
     txtField(i).Text = ""
   Next i
End Sub

Private Sub cmdSubmit_Click()
If Len(Trim$(txtField(1).Text)) = 0 Or Len(Trim$(txtField(2).Text)) = 0 Or Len(Trim$(txtField(3).Text)) = 0 Or Len(Trim$(txtField(4).Text)) = 0 Then
    MsgBox "Please finish entering all customer particulars"
Else
    InsertMemberPart
End If

End Sub

Private Sub InsertMemberPart()
Dim strFields(1 To 4) As String, strSQL As String
Dim varData() As Variant
Dim i As Integer
Dim confirm As Integer
Dim s As String

For i = 1 To 4
    strFields(i) = ConvertToField(txtField(i).Text, False)
Next i

confirm = MsgBox("Confirm?", vbYesNo)
If confirm = vbYes Then
  
  strSQL = "INSERT INTO Members(" _
          & "Name,Address,PostalCode,Phone)" _
          & " VALUES('" & strFields(1) & "','" & strFields(2) _
          & "','" & strFields(3) & "','" & strFields(4) & "')"
  MsgBox strSQL
    
  Unload Me
  frmChoices.Show
  frmChoices.cmdVerify.Visible = False 'testing
  
 If RunActionQuery(strSQL) = 0 Then
    MsgBox "Sign up Unsuccessful"
 Else
    s = RunSelectQuery("Select ID from Members", varData)
    MsgBox "Sign up successful!"
    MsgBox "Your unqiue ID is " & s
      
 End If
End If
End Sub

⌨️ 快捷键说明

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