?
Solved

VB6 form make a field mandatory

Posted on 2014-02-11
4
Medium Priority
?
343 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 2000 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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Starting up a Project

765 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