•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 456,608 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,456 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
Views: 1933 | Replies: 3
![]() |
•
•
Join Date: Nov 2007
Posts: 14
Reputation:
Rep Power: 2
Solved Threads: 0
Hi!
Everyone I am doing one business project in VB.NET... that every form and controls validation are very important, please help me....I am beginner of the VB.NET, suppose to run the form, after finishing data entry to click EXIT button, to show the msgbox if 'yes' close the form, 'no' form never closed...like how i check SAVE,DELETE,EDIT after i am going to click these buttons check the mandatory field.... please help me...VERY URGENT
My advance thanks
Saravanarajan
Everyone I am doing one business project in VB.NET... that every form and controls validation are very important, please help me....I am beginner of the VB.NET, suppose to run the form, after finishing data entry to click EXIT button, to show the msgbox if 'yes' close the form, 'no' form never closed...like how i check SAVE,DELETE,EDIT after i am going to click these buttons check the mandatory field.... please help me...VERY URGENT
My advance thanks
Saravanarajan
i am not sure if i understand you .
any way to check mandatory fields , check they not empty
for example if user must enter ID in textbox check it like this
about confirming exit the form use msgbox like this
any way to check mandatory fields , check they not empty
for example if user must enter ID in textbox check it like this
if Id_textbox="" then Label1.Text = "you must enter the ID" end if
Dim c As Integer
c = MsgBox("are you sure you want to exit", MsgBoxStyle.OKCancel, "Exit")
If c = 1 Then
Me.Close()
End If Last edited by manal : Nov 11th, 2007 at 3:03 am.
"give only what u willing to receive "
•
•
Join Date: Nov 2007
Posts: 14
Reputation:
Rep Power: 2
Solved Threads: 0
its only working exit button query.....plz understand my problem but if click save button at the time to check all the mandatory field and also to show all the field in list to user with msg, "you must enter these fields.....plese help me
regds,
saravanarajan
regds,
saravanarajan
Last edited by saravanarajan : Nov 12th, 2007 at 12:24 am.
•
•
Join Date: Apr 2007
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
Hi u can do like this
If Me.Txt_Width.Text = "" Then
MessageBox.Show("Please Enter Width Information")
Me.Txt_Width.Focus()
ElseIf Me.Txt_Width.Text.Length > 5 Then
MessageBox.Show("Please Enter Length Less Than 5")
Me.Txt_Width.Focus()
ElseIf Not Me.regex_Num.IsMatch(Me.Txt_Width.Text) Then
MessageBox.Show("Please Enter Only Digits")
Me.Txt_Width.Focus()
ElseIf Me.Txt_Length.Text = "" Then
MessageBox.Show("Please Enter Length Information")
Me.Txt_Length.Focus()
ElseIf Me.Txt_Length.Text.Length > 5 Then
MessageBox.Show("Please Enter Length Less Than 5")
Me.Txt_Width.Focus()
ElseIf Not Me.regex_Num.IsMatch(Me.Txt_Width.Text) Then
MessageBox.Show("Please Enter Only Digits")
Me.Txt_Length.Focus()
ElseIf Me.Txt_Nearest_Location.Text = "" Then
MessageBox.Show("Please Enter Nearest Location Information")
Me.Txt_Nearest_Location.Focus()
ElseIf Me.Txt_Nearest_Location.Text.Length > 100 Then
MessageBox.Show("Please Enter Length Less Than 100")
Me.Txt_Nearest_Location.Focus()
ElseIf Me.Txt_Code.Text = "" Then
MessageBox.Show("Please Enter Board Code Information")
Me.Txt_Code.Focus()
ElseIf Me.Txt_Map_Reference.Text = """" Then
MessageBox.Show("Please Enter Board Map Reference Information")
Me.Txt_Code.Focus()
ElseIf Not regex_Num.IsMatch(Me.Txt_Code.Text) Then
MessageBox.Show("Please Enter Number In Correct Format")
Me.Txt_Code.Focus()
ElseIf Me.Txt_Map_Reference.Text = "" Then
MessageBox.Show("Please Enter Map Reference information")
Me.Txt_Map_Reference.Focus()
If Me.Txt_Width.Text = "" Then
MessageBox.Show("Please Enter Width Information")
Me.Txt_Width.Focus()
ElseIf Me.Txt_Width.Text.Length > 5 Then
MessageBox.Show("Please Enter Length Less Than 5")
Me.Txt_Width.Focus()
ElseIf Not Me.regex_Num.IsMatch(Me.Txt_Width.Text) Then
MessageBox.Show("Please Enter Only Digits")
Me.Txt_Width.Focus()
ElseIf Me.Txt_Length.Text = "" Then
MessageBox.Show("Please Enter Length Information")
Me.Txt_Length.Focus()
ElseIf Me.Txt_Length.Text.Length > 5 Then
MessageBox.Show("Please Enter Length Less Than 5")
Me.Txt_Width.Focus()
ElseIf Not Me.regex_Num.IsMatch(Me.Txt_Width.Text) Then
MessageBox.Show("Please Enter Only Digits")
Me.Txt_Length.Focus()
ElseIf Me.Txt_Nearest_Location.Text = "" Then
MessageBox.Show("Please Enter Nearest Location Information")
Me.Txt_Nearest_Location.Focus()
ElseIf Me.Txt_Nearest_Location.Text.Length > 100 Then
MessageBox.Show("Please Enter Length Less Than 100")
Me.Txt_Nearest_Location.Focus()
ElseIf Me.Txt_Code.Text = "" Then
MessageBox.Show("Please Enter Board Code Information")
Me.Txt_Code.Focus()
ElseIf Me.Txt_Map_Reference.Text = """" Then
MessageBox.Show("Please Enter Board Map Reference Information")
Me.Txt_Code.Focus()
ElseIf Not regex_Num.IsMatch(Me.Txt_Code.Text) Then
MessageBox.Show("Please Enter Number In Correct Format")
Me.Txt_Code.Focus()
ElseIf Me.Txt_Map_Reference.Text = "" Then
MessageBox.Show("Please Enter Map Reference information")
Me.Txt_Map_Reference.Focus()
![]() |
•
•
•
•
•
•
•
•
DaniWeb VB.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- plz i want t learn vb.net (VB.NET)
- Hi first time to this site (Community Introductions)
Other Threads in the VB.NET Forum
- Previous Thread: image editor
- Next Thread: Is VB.NET an OOP?


Linear Mode