• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 355
  • Last Modified:

VB6 form make a field mandatory

The field Lot Number (txtLotNumb) needs to be mandatory.  From what I see this is not a property setting. The sub routine seen below is the code associated with the field.  How would I make this filed mandatory?
Thanks in Advance

Private Sub txtLotNumb_Change()

End Sub

For a complete picture see the attached file.
Thanks in Advance
The-field-Lot-Number.docx
0
tesla764
Asked:
tesla764
  • 2
  • 2
1 Solution
 
advfinanceCommented:
How about, somewhere in cmdSave_Click()...

If Len(Trim(txtLotNumb.Text)) = 0 Then
    MsgBox "Please enter lot number.", "Item Allocation", vbInformation
    Exit Sub
End If

Open in new window


--
Chris
0
 
tesla764Author Commented:
I will try this in a few minutes. Thanks.
0
 
tesla764Author Commented:
This is something I can definately work with.
Thanks you for pinting me in the right direction.
0
 
advfinanceCommented:
You're welcome Merle. Happy coding.

--
Chris
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now