Solved

VB6 form make a field mandatory

Posted on 2014-02-11
4
327 Views
Last Modified: 2014-02-11
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
Comment
Question by:tesla764
  • 2
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
advfinance earned 500 total points
ID: 39850787
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
 

Author Comment

by:tesla764
ID: 39850813
I will try this in a few minutes. Thanks.
0
 

Author Comment

by:tesla764
ID: 39850893
This is something I can definately work with.
Thanks you for pinting me in the right direction.
0
 
LVL 5

Expert Comment

by:advfinance
ID: 39850918
You're welcome Merle. Happy coding.

--
Chris
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is an explanation of a simple data model to help parse a JSON feed
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now