Solved

VB6 form make a field mandatory

Posted on 2014-02-11
4
340 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A short article about a problem I had getting the GPS LocationListener working.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
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…
Six Sigma Control Plans

691 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