Use If Statements For Code So People Cannot Enter The Wrong Information Like Letters Into The Account Number Box?

Mar 27, 2011

basically just trying to use if statements for my code so people cannot enter the wrong information like letters into the account number box

If (txtAcountNumberInput.Text = "") Or (txtTelephoneNumberInput.Text = "") Or (ComboBoxPhonePlan.Text = "") Or (txtCallDuration.Text = "") Or (txtCallDate.Text = "") Or (ComboBoxCountryBeingCalled.Text = "") Or (txtTimeAsCustomer.Text = "") Or (ComboBoxEveningCall.Text = "") Then

[code]....

so you see up the top i have if all any fields ="" then error that's fine it's a problem i need to so if statements so "account number" and hone number" cant be letters etc and if they are a error box will come up how i have done it does do that but ti still continues down the code hence cashing when getting to declaring things how to fix this?

View 5 Replies


ADVERTISEMENT

Code To Enter Letters Of Alphabet?

Jun 7, 2012

I want to validate my textbox so that a user can only add letters of the alphabet and not anything else. so far the code that I have allow alphabetic entries but does not allow to delete and backspace[code]...

View 9 Replies

Code To Enter Monly Letters Of The Alphabet?

Oct 4, 2011

i want to validate my textbox so that a user can only add letters of the alphabet and not anything else. so far the code that I have allow alphabetic entries but does not allow to delete and backspace

e.Handled = Not Char.IsLetter(e.KeyChar)

View 1 Replies

Add Each Account Number To List1 So Now The Account Number Is Associated With The ListBox?

Apr 26, 2009

Ok this is what I'm stuck on:I have 2 ListBoxes and 2 Lists, let's call them ListBox1, ListBox2, List1 and List2.List1 needs to be associated with ListBox 1, and List2 with ListBox2 I loop through a bunch of accounts, add them to LixBox1 at run-time.During that loop I add each account number to List1 so now the account number is associated with the ListBox index number which is right.Now when I double click one of the accounts in ListBox1 it is added to ListBox2 (but it still remains in ListBox1), and the same index of List1 added to List 2, now the account in ListBox2 is associated with the account number at the same index in List2 you see where I'm going with this?The issue wtarts here.When I double click an account (let's say the account at the first index) in ListBox2 it should be removed from the list, so now I remove the index from List2 since it's no longer needed, but now you know what's happened right? ListBox2's List indexes have all decremented by 1 because I just removed an item from the beginning of the list, but List2's indexes have stayed the same (at least that's how it appeared when I tested it).

So basically whats the best method for keeping things in reference? I was told about list boxes in another thread of mine, but is it really the best way to go about this, I can't seem to keep everything linked together reliably.

View 10 Replies

Wrong Input For 3 Times And Account Will Be Blocked?

Mar 22, 2012

I am making a banking system in Vb.Net but I had a problem with this function. If a user fails to input the pin number for 3 times, it will be block automatically and will need the admins permission in order for that person to activate the account again. I really don't know how to code the blocking of account and asks for admins authorization to unblock the account again. By the way I'm also using MsAccess as my database for my Bank Simulation.

View 5 Replies

Program To Integrate Several Entities Of People To Get Them To Work Together By Sharing Information

Jul 7, 2009

I am working on a program to integrate several entities of people to get them to work together by sharing information.I am having.I am using a database (Access) in which I can upload photos but can not understand how to store PDF and word.Also looking into implementing email.User inputs information on the forms with the attached (in datastore) PDF and word files and with one button email multiple users in certain areas.I can figure out how to code the email to: portion.Looking to be able to open a chat type interface. I understand I use the winsock com but I do not have it. Does anyone know what the heck this Adobe Breeze thing is?

View 2 Replies

VS 2008 Uploading Files With FTP Then People Can Always Read My Information With Network Sniffer

May 20, 2009

Well when i am uploading files with FTP then people can always read my information with a Network Sniffer.Thats why i now want to solve it with a PHP-Script now:This is the information when i upload a file:everything that is red i do not understand i tryed it then with the code below but doesent work. [code]

View 3 Replies

Able To Stop User From Entering Other Information Until Enter Right Information In The Textbox

May 24, 2012

I have a text box where i am entering numbers of double datatype andon the Keytdown event of the textbox some checks take pace and in certain circumstances I want to be able to stop the user from entering other information until they enter the right information in the textbox (where it says right here) . now when I say exit sub the textbox somehow loses focus . but this is not how I want it to be I want the textbox to remain with the focus so the user can change the information . How can i go about this. And the other thing is why is my txtDestPayRate1.Focus() just befor the exit sub not working?

Private Sub txtDestPayRate1_KeyDown1(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles txtDestPayRate1.KeyDown

If e.KeyCode = Keys.Enter Then

[CODE]...

View 2 Replies

Enter Numbers And Letters?

May 23, 2009

How do i make it so that you can only type in numbers and letters in a textbox? I want to disable the use of ("*(&$.....etc.) those types of symbols.

View 3 Replies

Using A Textbox To Enter Only Letters?

Dec 6, 2010

here is my problem, I'm using a textbox to enter only letters, no number, so i'm using a loop with a decision structure to tell me that the input data is wrong and prompt to input the data again but when I enter the correct data in the input box, vb2010 display this error "Conversion from string to type 'Double' is not valid.", this problem is making me crazy.

[Code]...

View 5 Replies

Disable To Enter Some Letters In Textbox?

Dec 26, 2009

How to disable to enter some letters (a,b,c,d...) in textbox? I want to can write just numbers and colon ( in textbox.

View 11 Replies

VS 2008 Register Keys (shifted Letters, Enter Key)?

Dec 20, 2009

When my program is looking at the keys it capitalizes all the keys and keys like enter, space, alt, and other keys are not registered so they dont come out correctly. I am writing information to a "RichTextBox1" and I need to know how to register all keys to this.

1. I need to know how to decapitalize all the letters.

2. How to make shifted letters work.

3. Make keys like enter, shift, and tab show up as text.

View 2 Replies

Retrieve Profile Information For An Asp.net Membership User Account?

Oct 26, 2010

I want to pass an asp.net membership user name to a subroutine and retrieve the profile property named FullName for that user, how can i achive this in vb.net?

View 2 Replies

Salary Application Code - Enter Any Number, "Double Array()" Shows Up In That List Box?

Feb 4, 2011

I'm having trouble finishing up this salary program which is designed to calculate salary based on gross sales while using arrays. Essentially, when the Calculate Salary click event is initiated after salary is entered, either $200 should show up in the list box or, if the persons sales were over $5,000, a calculation of their sales * 9% + 200 should show up in the list box. Right now, anytime I enter any number, "Double Array()" shows up in that list box. Additionally, a bar graph is supposed to supposed to be displayed in the lower list box showing how many people are in certain categories starting from "$200-$299" through "over $999". These results should be shown when the Show Totals click event is initiated.

[code]...

View 1 Replies

Coding Hangman Program So That When Enter A Wrong Letter A Picturebox Image Would Appear Eachtime?

Jan 15, 2011

I have most of the coding done, but i don't know how to code my hangman program so that when you enter a wrong letter, a picturebox image would appear eachtime. Also i want to put a limit on the amout of guesses you can have. If possible, i would also like a listbox with the letters that you have guessed wrong stored in it.

Here is my code so far:

Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[code].....

View 4 Replies

Make An Application Where Can Store A Lot Of Account Information In A File On Computer?

Jul 5, 2011

make a application where I can store a lot of account information in a file on my computer. This is how it works so far.I have a class called "AccountInfo" with some properties such as Account Name, Password, etc... This is bound to a DataGridView via a Bindingsource. So basicaly what I'm asking, is how can I save/load all these accounts in my computer easily in a file or something?

View 2 Replies

MySQL Query - Updating Account Information Displaying In Labels

Apr 19, 2010

I have been coding an application for a LeaderBoard for a game. I have all the Login sorted using Mysql and even have all the Account infomation displaying in lables etc. for account info form. Now I am trying to UPDATE information and this is how I was trying to do this...

Dim UpdateInfo As New MySqlDataAdapter
Dim mycommand As New MySqlCommand()
Dim mydata As MySqlDataReader
Dim query = "UPDATE Login SET Pword = '" + UpdateTxtBox.Text + "' WHERE Uname = " + Login.Uname
mycommand.Connection = conn
mycommand.CommandText = query
UpdateInfo.SelectCommand = mycommand
mydata = mycommand.ExecuteReader()

But comes back with an Error saying... Unknown column 'username here' in 'where clause'. Now the username is in the database as I have just logged in with it and I am taking it I have the Query wrong somewhere.

View 2 Replies

[2008] Error Validation - Series Of Nested If/then/else Statements To Make Sure A User Enters Information

Feb 15, 2009

I'm using a series of nested if/then/else statements to make sure a user enters information into each text box or chooses a radio button. What would i use to say if no text is entered in textbox1, then ... also what would i use to make a sure the user choose one or the other radio button? for example i also have a combo box, i used "If SubjectComboBox.SelectedIndex <> -1" for the if statement.

View 2 Replies

Prompt The User To Enter The Beginning Number And The Ending Number

Oct 4, 2009

I am supposed to create a program in my VB.net class to do the following:

1. Prompt the user to enter the beginning number and the ending number.

2. Find the sum of the even numbers between these two values, inclusive.

[Code]...

We are currently using for next statements in the class. I know how to prompt for and utilize the numbers that are input etc. My problem is the EVEN numbers part. I obviously have to determine if the number is even and then use a step value of 2 from there. But not sure how to determine if number is even or odd (guessing to use mod, but totally lost).

View 8 Replies

Prompt The User To Enter The Beginning Number And The Ending Number?

Mar 2, 2011

I am wounder if anyone might have a web site or no where I can find the information so I understand how to prompt the user to enter the beginning number and the ending number. And then to find the sum of the even number. Now does anyone know what a name convention is ? I have tried to look it up on the forums but cant find nothing on it.

View 9 Replies

Generating Auto-account Number?

Feb 18, 2011

i want to auto account generate account no in their name format for eg if the account name is ABC Travels account no will be A0005 if account name is XYZ Travels account no will be X0003 etc for this i want to know 2 things.first of all how to get 1st alphabet from a textbox for eg. textbox.text is QWERY so how to Q from it.Secondly from database data how to seperate Number from word. for eg if last account no is A0009 Now how to seperate 0009 or how to add +1 in A0009?

View 4 Replies

Search Algorithm For Account Number

Jan 27, 2009

The line in code is giving me problems it is preventing me from searching the first part of the array but if I move it to the end or to any other spot the search wont work.

Public Sub AccountNumberSearch(ByVal a() As Account, ByVal accnum As Integer, ByVal numacc As Integer)
Dim x As Integer = 0
Do Until a(x).AccountNumber = accnum
x += 1
[Code] .....

View 2 Replies

Seriescollection.count Gives The Wrong Number?

Jun 9, 2009

I am trying to customize the color of a microsoft graph chart in access using vba but my chart.seriescollection.count doesn't give me the right count?! It is stuck at 4 I don't know why. However, I've created a recordset from the query used to create the graph and the DAO fields are right. I tried to refresh the graph, close it and open it, reboot. My graph displays properly with the right data but I can't set the colors like I want and it is the most important part of it because I am plotting rock codes.

View 1 Replies

Generic Was Used With Wrong Number Of Arguments Error?

Feb 12, 2010

Does anyone know what on earth this is? i can't get it to go away.model {"The generic type 'System.Web.Mvc.ViewUserControl`1' was used with the wrong number of generic arguments in assembly 'System.Web.Mvc...it happens when i call a newly constructed model that i pass to a partial view, and try using/calling some methods of it in the view.

View 1 Replies

Create An Invoice Number Using The Last Two Letters?

Mar 2, 2009

I need to know how to use a function to do the following: Create an invoice number using the last two letters of the last name and the first four digits of the zip code.

Example:

Name: John Doe
Zip: 11111

Invoice number becomes DO1111

View 4 Replies

Displaying The Number Of Occurrences Of The Letters A,b,c,d,e?

Mar 17, 2010

I'm having a hard time displaying the number of occurrences of the letters a,b,c,d,e I want to use IndexOf, but just don't understand how.

]Dim s2, s3 As String
Dim s1 As String
Dim a, b, c, d, e As Integer
Do While (s1 <> "finish")

[code]....

View 2 Replies

Datagridview Has Wrong Number Of Columns When Binding To A Table

Nov 4, 2011

I need to have multiple lines in a cell, so I use DataGridViewTextBoxColumn.DefaultCellStyle.WrapMode =DataGridViewTriState.True. I add columns (datagridviewtextboxcolumn) in designer. Then bound datagridview to a table which has exact the same columns as datagridview. Then I find that datagridview has duplicate columns: the first column is empty (which I guess is added through designer), the second column is filled with data from table. My question is how to correctly allow multi-lines and bound to a table at the same time?

In Designer
Friend WithEvents DGV As New System.Windows.Forms.DataGridView
Friend WithEvents columnClient As System.Windows.Forms.DataGridViewTextBoxColumn
Friend WithEvents columnAccount As System.Windows.Forms.DataGridViewTextBoxColumn
Me.DGV.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn()

[Code].....

View 1 Replies

DB/Reporting :: Combo Box Selected Value Giving Wrong Number?

May 29, 2008

I have a combobox. The data that it binds to should be:

AcctID AcctName
10 Main
11 Old

[code].....

View 3 Replies

Enter Information Into The Overall Textbox?

Dec 13, 2011

when i enter information into the overall textbox say like 4.0 the calcuation should pick it up as 10.0 but its just taking the the 4.0 instead of the 10.0 in the select case. How do i get it to take 10.0 instead of 4.0. here is my code,

[Code]...

View 2 Replies

Force User To Input Number Not Letters

Jun 29, 2010

I'm attempting to learn VB in college. My first project is to create a program in Small Basic and then write it in Visual Basic. I'm looking for the equivalent of TextWindow.ReadNumber() from Small Basic in Visual Basic. I want to force the user to input a number not letters. I'm writing this program for the Console. Is this possible? During my testing I entered a word instead of numbers and the program crashed.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved