home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmBugs
- AutoRedraw = -1 'True
- BorderStyle = 3 'Fixed Dialog
- Caption = "Bug Report Wizard"
- ClientHeight = 4965
- ClientLeft = 990
- ClientTop = 1575
- ClientWidth = 7755
- Height = 5370
- Icon = "FRMBUGS.frx":0000
- Left = 930
- LinkTopic = "Form1"
- ScaleHeight = 4965
- ScaleWidth = 7755
- Top = 1230
- Width = 7875
- Begin VB.Frame fra
- Caption = "Bug Details"
- Height = 4875
- Index = 2
- Left = 585
- TabIndex = 28
- Tag = "This page contains details about the problem being reported."
- Top = 585
- Visible = 0 'False
- Width = 7665
- Begin VB.TextBox txtMultiBugs
- Height = 1185
- Index = 1
- Left = 225
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 40
- Top = 3510
- Width = 7260
- End
- Begin VB.TextBox txtBugs
- Height = 285
- Index = 1
- Left = 225
- MaxLength = 255
- TabIndex = 36
- Top = 1260
- Width = 7260
- End
- Begin VB.ComboBox cboBugs
- Height = 300
- Index = 1
- Left = 4680
- Sorted = -1 'True
- Style = 2 'Dropdown List
- TabIndex = 34
- Top = 585
- Width = 2760
- End
- Begin VB.ComboBox cboBugs
- Height = 300
- Index = 0
- Left = 225
- Sorted = -1 'True
- Style = 2 'Dropdown List
- TabIndex = 30
- Top = 585
- Width = 2760
- End
- Begin VB.TextBox txtMultiBugs
- Height = 1185
- Index = 0
- Left = 225
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 38
- Top = 1935
- Width = 7260
- End
- Begin VB.TextBox txtBugs
- Height = 285
- Index = 0
- Left = 3105
- MaxLength = 255
- TabIndex = 32
- Top = 585
- Width = 1455
- End
- Begin VB.Label lblBugs
- BackStyle = 0 'Transparent
- Caption = "&Steps to Reproduce:"
- Height = 195
- Index = 5
- Left = 225
- TabIndex = 39
- Top = 3240
- Width = 2760
- End
- Begin VB.Label lblBugs
- BackStyle = 0 'Transparent
- Caption = "&Description of the Problem:"
- Height = 195
- Index = 4
- Left = 225
- TabIndex = 37
- Top = 1665
- Width = 2760
- End
- Begin VB.Label lblBugs
- BackStyle = 0 'Transparent
- Caption = "&Bug Title:"
- Height = 195
- Index = 3
- Left = 225
- TabIndex = 35
- Top = 990
- Width = 2760
- End
- Begin VB.Label lblBugs
- BackStyle = 0 'Transparent
- Caption = "&Reproducible:"
- Height = 195
- Index = 2
- Left = 4680
- TabIndex = 33
- Top = 315
- Width = 2760
- End
- Begin VB.Label lblBugs
- BackStyle = 0 'Transparent
- Caption = "&Version.Build:"
- Height = 195
- Index = 1
- Left = 3105
- TabIndex = 31
- Top = 315
- Width = 1455
- End
- Begin VB.Label lblBugs
- BackStyle = 0 'Transparent
- Caption = "&Product:"
- Height = 195
- Index = 0
- Left = 225
- TabIndex = 29
- Top = 315
- Width = 2760
- End
- End
- Begin VB.Frame fra
- Caption = "Hardware Information:"
- Height = 5010
- Index = 1
- Left = 360
- TabIndex = 11
- Tag = "This page displays information about the tester's system configuration"
- Top = 405
- Visible = 0 'False
- Width = 7530
- Begin VB.TextBox txtHardware
- Height = 285
- Index = 2
- Left = 225
- MaxLength = 255
- TabIndex = 27
- Top = 4410
- Width = 7200
- End
- Begin VB.TextBox txtHardware
- Height = 285
- Index = 1
- Left = 225
- MaxLength = 255
- TabIndex = 25
- Top = 3735
- Width = 7200
- End
- Begin VB.ComboBox cboHardware
- Height = 315
- Index = 4
- Left = 1665
- Sorted = -1 'True
- TabIndex = 21
- Top = 2385
- Width = 3210
- End
- Begin VB.ComboBox cboHardware
- Height = 315
- Index = 3
- Left = 1665
- Sorted = -1 'True
- TabIndex = 19
- Top = 1890
- Width = 3210
- End
- Begin VB.ComboBox cboHardware
- Height = 315
- Index = 2
- Left = 1665
- Sorted = -1 'True
- TabIndex = 17
- Top = 1395
- Width = 3210
- End
- Begin VB.ComboBox cboHardware
- Height = 315
- Index = 1
- Left = 1665
- Sorted = -1 'True
- TabIndex = 15
- Top = 900
- Width = 3210
- End
- Begin VB.TextBox txtHardware
- Height = 285
- Index = 0
- Left = 225
- MaxLength = 255
- TabIndex = 23
- Top = 3105
- Width = 7200
- End
- Begin VB.ComboBox cboHardware
- Height = 315
- Index = 0
- Left = 1665
- Sorted = -1 'True
- TabIndex = 13
- Top = 405
- Width = 3210
- End
- Begin VB.Label lblHardware
- BackStyle = 0 'Transparent
- Caption = "File S&ystems in Use:"
- Height = 195
- Index = 7
- Left = 225
- TabIndex = 26
- Top = 4140
- Width = 1410
- End
- Begin VB.Label lblHardware
- BackStyle = 0 'Transparent
- Caption = "&Floppy Drives:"
- Height = 195
- Index = 6
- Left = 225
- TabIndex = 24
- Top = 3465
- Width = 1410
- End
- Begin VB.Label lblHardware
- BackStyle = 0 'Transparent
- Caption = "&Other Adapters:"
- Height = 195
- Index = 5
- Left = 225
- TabIndex = 22
- Top = 2835
- Width = 1410
- End
- Begin VB.Label lblHardware
- BackStyle = 0 'Transparent
- Caption = "&SCSI Adapter:"
- Height = 195
- Index = 4
- Left = 225
- TabIndex = 20
- Top = 2430
- Width = 1410
- End
- Begin VB.Label lblHardware
- BackStyle = 0 'Transparent
- Caption = "&Boot Drive Type:"
- Height = 195
- Index = 3
- Left = 225
- TabIndex = 18
- Top = 1935
- Width = 1410
- End
- Begin VB.Label lblHardware
- BackStyle = 0 'Transparent
- Caption = "&Video Adapter:"
- Height = 195
- Index = 2
- Left = 225
- TabIndex = 16
- Top = 1440
- Width = 1410
- End
- Begin VB.Label lblHardware
- BackStyle = 0 'Transparent
- Caption = "&Computer Type:"
- Height = 195
- Index = 1
- Left = 225
- TabIndex = 14
- Top = 945
- Width = 1410
- End
- Begin VB.Label lblHardware
- BackStyle = 0 'Transparent
- Caption = "&Operating System:"
- Height = 195
- Index = 0
- Left = 225
- TabIndex = 12
- Top = 450
- Width = 1410
- End
- End
- Begin VB.Frame fra
- Caption = "Contact Information"
- Height = 4965
- Index = 0
- Left = 90
- TabIndex = 2
- Tag = "This page displays vital information about the tester who reported the bug."
- Top = 405
- Width = 7620
- Begin VB.ComboBox cboContact
- Height = 315
- Left = 225
- Sorted = -1 'True
- TabIndex = 1
- Top = 765
- Width = 2625
- End
- Begin VB.TextBox txtContact
- Height = 285
- Index = 2
- Left = 225
- MaxLength = 255
- TabIndex = 10
- Top = 4275
- Width = 3345
- End
- Begin VB.TextBox txtContact
- Height = 285
- Index = 1
- Left = 4005
- MaxLength = 255
- TabIndex = 8
- Top = 3510
- Width = 3345
- End
- Begin VB.TextBox txtContact
- Height = 285
- Index = 0
- Left = 225
- MaxLength = 255
- TabIndex = 6
- Top = 3555
- Width = 3345
- End
- Begin VB.TextBox txtMultiContact
- Height = 1500
- Index = 0
- Left = 225
- MultiLine = -1 'True
- TabIndex = 4
- Top = 1575
- Width = 7170
- End
- Begin VB.Label lblContact
- BackStyle = 0 'Transparent
- Caption = "&Beta ID:"
- Height = 195
- Index = 4
- Left = 225
- TabIndex = 0
- Top = 495
- Width = 2760
- End
- Begin VB.Label lblContact
- BackStyle = 0 'Transparent
- Caption = "&Internet Address:"
- Height = 195
- Index = 3
- Left = 225
- TabIndex = 9
- Top = 4005
- Width = 2760
- End
- Begin VB.Label lblContact
- BackStyle = 0 'Transparent
- Caption = "&Fax:"
- Height = 195
- Index = 2
- Left = 4005
- TabIndex = 7
- Top = 3240
- Width = 2760
- End
- Begin VB.Label lblContact
- BackStyle = 0 'Transparent
- Caption = "&Phone Number:"
- Height = 195
- Index = 1
- Left = 225
- TabIndex = 5
- Top = 3285
- Width = 2760
- End
- Begin VB.Label lblContact
- BackStyle = 0 'Transparent
- Caption = "&Name && Address:"
- Height = 195
- Index = 0
- Left = 225
- TabIndex = 3
- Top = 1305
- Width = 2760
- End
- End
- Begin VB.CommandButton cmd
- BackColor = &H00C0C0C0&
- Caption = "&Finish"
- Enabled = 0 'False
- Height = 375
- Index = 4
- Left = 5085
- TabIndex = 45
- Top = 2295
- Width = 1095
- End
- Begin VB.CommandButton cmd
- BackColor = &H00C0C0C0&
- Caption = "&Next >>"
- Height = 375
- Index = 3
- Left = 3870
- TabIndex = 44
- Top = 2295
- Width = 1095
- End
- Begin VB.CommandButton cmd
- BackColor = &H00C0C0C0&
- Caption = "<< &Previous"
- Enabled = 0 'False
- Height = 375
- Index = 2
- Left = 2700
- TabIndex = 43
- Top = 2295
- Width = 1095
- End
- Begin VB.CommandButton cmd
- BackColor = &H00C0C0C0&
- Cancel = -1 'True
- Caption = "&Cancel"
- Height = 375
- Index = 1
- Left = 1485
- TabIndex = 42
- Top = 2295
- Width = 1095
- End
- Begin VB.CommandButton cmd
- BackColor = &H00C0C0C0&
- Caption = "&Hint"
- Height = 375
- Index = 0
- Left = 270
- TabIndex = 41
- Top = 2295
- Width = 1095
- End
- Attribute VB_Name = "frmBugs"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- '*********************************************************************
- ' FRMBUGS.FRM - This is a bug reporting form that writes to a Access
- ' database via direct calls to the Jet database layer.
- '*********************************************************************
- Option Explicit
- Private DBase As New GenericDB
- Private FrameIndex%, BetaID$
- '*********************************************************************
- ' Create more descriptive names for the cmd array indicies.
- '*********************************************************************
- Private Const CMD_HINT = 0
- Private Const CMD_CANCEL = 1
- Private Const CMD_PREV = 2
- Private Const CMD_NEXT = 3
- Private Const CMD_FINISH = 4
- Private Const MAX_FRAMES_INDEX = 2
- '*********************************************************************
- ' Make sure a Beta ID is listed.
- '*********************************************************************
- Private Sub cboContact_LostFocus()
- '*****************************************************************
- ' Set the global variable.
- '*****************************************************************
- BetaID = Trim(cboContact)
- '*****************************************************************
- ' If one wasn't entered, then alert the user and halt.
- '*****************************************************************
- If BetaID = "" Then
- PlayWaveRes "Ding"
- MsgBox "This field can not be blank!", vbCritical
- cboContact.SetFocus
- '*****************************************************************
- ' Otherwise load the other controls with the data from that id.
- '*****************************************************************
- Else
- LoadPage
- End If
- End Sub
- '*********************************************************************
- ' Process command button clicks.
- '*********************************************************************
- Private Sub cmd_Click(Index As Integer)
- Select Case Index
- '*************************************************************
- ' Display a hint (from the frame's .Tag) in a message box.
- '*************************************************************
- Case CMD_HINT
- PlayWaveRes "Chimes"
- MsgBox fra(FrameIndex).Tag, vbInformation
- '*************************************************************
- ' Cancel is used to quit without filing a report.
- '*************************************************************
- Case CMD_CANCEL
- If MsgBox("Are you sure you want to Quit?" _
- , vbQuestion + vbYesNo) = vbYes Then
- PlayWaveRes "Hasta"
- Unload Me
- End If
- '*************************************************************
- ' The next two are used to navigate between frames.
- '*************************************************************
- Case CMD_PREV
- NavigatePages False
- Case CMD_NEXT
- NavigatePages True
- '*************************************************************
- ' File the bug report.
- '*************************************************************
- Case CMD_FINISH
- '*********************************************************
- ' If UpdateData failed, then the title must have already
- ' appeared in the database. Set the focus to the title
- ' text box, and exit. If the user wants to quit without
- ' fixing the problem, then they'll have to use cancel.
- '*********************************************************
- If Not UpdateData(FrameIndex) Then
- txtBugs(1).SetFocus
- Exit Sub
- End If
- '*********************************************************
- ' If the report was successfully filed, then ask the user
- ' if they want to fine another. If so, clear the page.
- '*********************************************************
- If MsgBox("Would you like to report another bug?" _
- , vbQuestion + vbYesNo) = vbYes Then
- txtBugs(1) = ""
- txtMultiBugs(0) = ""
- txtMultiBugs(1) = ""
- txtBugs(1).SetFocus
- '*********************************************************
- ' Otherwise tell the user goodbye, and unload.
- '*********************************************************
- Else
- PlayWaveRes "ItsBeen"
- MsgBox "Thank you for completing this report.", _
- vbInformation
- Unload Me
- End If
- End Select
- End Sub
- '*********************************************************************
- ' Position everything, open the database, load the combos, and play
- ' and opening tune.
- '*********************************************************************
- Private Sub Form_Load()
- SetupForm
- LoadFrames
- '*****************************************************************
- ' Open the database, and load the combos from its contents.
- '*****************************************************************
- DBase.OpenDB App.Path & "\bugs.mdb"
- LoadCombos
- '*****************************************************************
- ' Play an introductory tune, and unload the splash form.
- '*****************************************************************
- PlayWaveRes "Game"
- End Sub
- '*********************************************************************
- ' Load all of the combo boxes with data from the database.
- '*********************************************************************
- Private Sub LoadCombos()
- DBase.CreateRecordSet "List Defaults"
- DBase.GetControlData "OS", cboHardware(0)
- DBase.GetControlData "Computer", cboHardware(1)
- DBase.GetControlData "Video", cboHardware(2)
- DBase.GetControlData "Boot", cboHardware(3)
- DBase.GetControlData "SCSI", cboHardware(4)
- DBase.GetControlData "Products", cboBugs(0)
- DBase.GetControlData "Repro", cboBugs(1)
- DBase.Data.Close
- DBase.CreateRecordSet fra(0)
- DBase.GetControlData "BetaID", cboContact
- End Sub
- '*********************************************************************
- ' Position the buttons, form, and frames.
- '*********************************************************************
- Private Sub SetupForm()
- Const CMD_TOP = 5350
- Const CMD_WIDTH = 1095
- Const CMD_HEIGHT = 375
- cmd(0).Move 1880, CMD_TOP, CMD_WIDTH, CMD_HEIGHT
- cmd(1).Move 3095, CMD_TOP, CMD_WIDTH, CMD_HEIGHT
- cmd(2).Move 4310, CMD_TOP, CMD_WIDTH, CMD_HEIGHT
- cmd(3).Move 5480, CMD_TOP, CMD_WIDTH, CMD_HEIGHT
- cmd(4).Move 6695, CMD_TOP, CMD_WIDTH, CMD_HEIGHT
- Width = 8125
- Height = 6300
- Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2
- LoadFrames
- Draw3DLine
- End Sub
- '*********************************************************************
- ' Initializies the frames.
- '*********************************************************************
- Private Sub LoadFrames()
- Dim i As Integer
- '*****************************************************************
- ' Position the frames.
- '*****************************************************************
- For i = 2 To 0 Step -1
- fra(i).Move 135, 135, 7665, 4875
- fra(i).ZOrder
- Next i
- '*****************************************************************
- ' Change the captions.
- '*****************************************************************
- fra(0) = "Contact Information"
- fra(1) = "Hardware Information"
- fra(2) = "Bug Details"
- End Sub
- '*********************************************************************
- ' Handles changing frames.
- '*********************************************************************
- Private Sub NavigatePages(ByVal bMoveNext As Boolean)
- '*****************************************************************
- ' If you can't update the data, then exit.
- '*****************************************************************
- If bMoveNext And Not UpdateData(FrameIndex) Then Exit Sub
- '*****************************************************************
- ' Hide the current frame, increment FrameIndex, then show the new
- ' frame.
- '*****************************************************************
- fra(FrameIndex).Visible = False
- FrameIndex = IIf(bMoveNext, FrameIndex + 1, FrameIndex - 1)
- fra(FrameIndex).Visible = True
- '*****************************************************************
- ' Open the table for the current page, and load the data.
- '*****************************************************************
- DBase.Data.Close
- DBase.CreateRecordSet fra(FrameIndex)
- LoadPage
- '*****************************************************************
- ' Change the enabled status of the command buttons.
- '*****************************************************************
- If FrameIndex = 0 Then
- cmd(CMD_PREV).Enabled = False
- ElseIf FrameIndex = MAX_FRAMES_INDEX Then
- cmd(CMD_NEXT).Enabled = False
- Else
- cmd(CMD_PREV).Enabled = True
- cmd(CMD_NEXT).Enabled = True
- End If
- End Sub
- '*********************************************************************
- ' Draw a 3D line above the command buttons.
- '*********************************************************************
- Private Sub Draw3DLine()
- Dim iXStart%, iXEnd%, iYStart%, iPixel%
- '*****************************************************************
- ' Calculate where the line should be drawn.
- '*****************************************************************
- iPixel = Screen.TwipsPerPixelY
- iXEnd = cmd(4).Left + cmd(4).Width
- iXStart = fra(0).Left + iPixel
- iYStart = cmd(0).top - (iPixel * 10)
- '*****************************************************************
- ' Draw the grey line, then the white line underneath.
- '*****************************************************************
- Line (iXStart, iYStart)-(iXEnd, iYStart), vb3DShadow
- iYStart = iYStart + iPixel
- Line (iXStart, iYStart)-(iXEnd, iYStart), vb3DHighlight
- End Sub
- '*********************************************************************
- ' Write the changes or additions to the database.
- '*********************************************************************
- Private Function UpdateData(Index%, Optional AddRec) As Boolean
- Static Iterations As Integer
- '*****************************************************************
- 'AddRec determines wheither to add or update a record.
- '*****************************************************************
- AddRec = IIf(IsMissing(AddRec), True, AddRec)
- '*****************************************************************
- ' Iterations is used to prevent uncontrolled recursive loops.
- '*****************************************************************
- Iterations = Iterations + 1
- '*****************************************************************
- ' Clear the error handler (for recursive calls only).
- '*****************************************************************
- If Iterations > 0 Then Err = 0
- '*****************************************************************
- ' Update the appropriate page.
- '*****************************************************************
- Select Case Index
- '*************************************************************
- ' Contact Information
- '*************************************************************
- Case 0
- '*********************************************************
- ' Verify required fields.
- '*********************************************************
- If Not VerifyRequiredField(txtMultiContact(0)) Then Exit Function
- If Not VerifyRequiredField(txtContact(0)) Then Exit Function
- DBase.AddOrEditRecord AddRec, _
- "NameAddress|" & txtMultiContact(0), _
- "Phone|" & txtContact(0), _
- "Fax|" & txtContact(1), _
- "InternetAddress|" & txtContact(2), _
- "BetaID|" & cboContact
- '*************************************************************
- ' Hardware Information
- '*************************************************************
- Case 1
- If Not VerifyRequiredField(cboHardware(0)) Then Exit Function
- If Not VerifyRequiredField(cboHardware(1)) Then Exit Function
- If Not VerifyRequiredField(cboHardware(2)) Then Exit Function
- If Not VerifyRequiredField(cboHardware(3)) Then Exit Function
- DBase.AddOrEditRecord AddRec, _
- "OperatingSystem|" & cboHardware(0), _
- "ComputerType|" & cboHardware(1), _
- "VideoAdapter|" & cboHardware(2), _
- "BootDiskType|" & cboHardware(3), _
- "SCSI|" & cboHardware(4), _
- "OtherDiskTypes|" & txtHardware(0), _
- "Floppies|" & txtHardware(1), _
- "FileSystems|" & txtHardware(2), _
- "BetaID|" & BetaID
- '*************************************************************
- ' Bug Details
- '*************************************************************
- Case 2
- If Not VerifyRequiredField(txtBugs(0)) Then Exit Function
- If Not VerifyRequiredField(txtBugs(1)) Then Exit Function
- If Not VerifyRequiredField(txtMultiBugs(0)) Then Exit Function
- If Not VerifyRequiredField(txtMultiBugs(1)) Then Exit Function
- DBase.AddOrEditRecord AddRec, _
- "Product|" & cboBugs(0), _
- "Build|" & txtBugs(0), _
- "Reproducible|" & cboBugs(1), _
- "Title|" & txtBugs(1), _
- "Problem|" & txtMultiBugs(0), _
- "Steps|" & txtMultiBugs(1), _
- "BetaID|" & BetaID
- End Select
- '*****************************************************************
- ' If Index is 2 and duplicate key error, then notify the user
- ' that the title is invalid.
- '*****************************************************************
- If Index = MAX_FRAMES_INDEX And Err = 3022 Then
- PlayWaveRes "Ring"
- MsgBox "A report with the same name has already been reported.", _
- vbExclamation
- Iterations = 0
- UpdateData = False
- '*****************************************************************
- ' If less than 2 iterations, then recursively call.
- '*****************************************************************
- ElseIf Iterations < 2 And Err Then
- UpdateData = UpdateData(Index, False)
- Iterations = 0
- '*****************************************************************
- ' Otherwise return true and reset the iterations variable.
- '*****************************************************************
- Else
- UpdateData = True
- Iterations = 0
- End If
- End Function
- '*********************************************************************
- ' If the "Steps" text box is empty, then disable the finish button.
- '*********************************************************************
- Private Sub txtMultiBugs_Change(Index As Integer)
- If Index = 1 Then
- cmd(CMD_FINISH).Enabled = IIf(txtMultiBugs(1) <> "", True, False)
- End If
- End Sub
- '*********************************************************************
- ' Loads the data from the database into the controls.
- '*********************************************************************
- Private Sub LoadPage()
- '*****************************************************************
- ' Find the record based on its BetaID value.
- '*****************************************************************
- If DBase.FindRecord("BetaID", BetaID) = "" Then
- ClearAll
- Exit Sub
- End If
- '*****************************************************************
- ' Use the public FrameIndex value to determine which frame to load.
- '*****************************************************************
- Select Case FrameIndex
- Case 0
- '**********************************************************
- 'NOTE: & "" is appended to each line to prevent triggering
- ' an error if the return value from the record is NULL.
- '**********************************************************
- txtMultiContact(0) = DBase.GetRecord("NameAddress") & ""
- txtContact(0) = DBase.GetRecord("Phone") & ""
- txtContact(1) = DBase.GetRecord("Fax") & ""
- txtContact(2) = DBase.GetRecord("InternetAddress") & ""
- Case 1
- cboHardware(0) = DBase.GetRecord("OperatingSystem") & ""
- cboHardware(1) = DBase.GetRecord("ComputerType") & ""
- cboHardware(2) = DBase.GetRecord("VideoAdapter") & ""
- cboHardware(3) = DBase.GetRecord("BootDiskType") & ""
- cboHardware(4) = DBase.GetRecord("SCSI") & ""
- txtHardware(0) = DBase.GetRecord("OtherDiskTypes") & ""
- txtHardware(1) = DBase.GetRecord("Floppies") & ""
- txtHardware(2) = DBase.GetRecord("FileSystems") & ""
- End Select
- End Sub
- '*********************************************************************
- ' Clear and reset selected controls.
- '*********************************************************************
- Private Sub ClearAll()
- txtMultiContact(0) = ""
- txtContact(0) = ""
- txtContact(1) = ""
- txtContact(2) = ""
- cboHardware(0).ListIndex = 0
- cboHardware(1).ListIndex = 0
- cboHardware(2).ListIndex = 0
- cboHardware(3).ListIndex = 0
- cboHardware(4).ListIndex = 0
- txtHardware(0) = ""
- txtHardware(1) = ""
- txtHardware(2) = ""
- End Sub
- '*********************************************************************
- ' If the field is required, then make sure it isn't blank.
- '*********************************************************************
- Private Function VerifyRequiredField(Cntl As Control) As Boolean
- If Cntl.Text = "" Then
- MsgBox "This is a required field!", vbExclamation
- '*************************************************************
- ' Put a blank space in the control to prevent another error.
- '*************************************************************
- Cntl.Text = " "
- Cntl.SetFocus
- VerifyRequiredField = False
- Exit Function
- End If
- '*****************************************************************
- ' If its data is valid, then return True.
- '*****************************************************************
- VerifyRequiredField = True
- End Function
-