Create an application that allows the user to enter the following employee data: First Name, Middle Name, Last Name, Employee Number, Department, Telephone Number, Telephone Extension, and E-mail Address. The valid values for department are Accounting, Administration, Marketing, MIS, and Sales. Once the data is entered, the user should be able to save it to a file. Figure 9-30 shows an example of the application's form. The form shown in Figure 9-30 has a combo box for selecting the department; a Save Record button, which writes the record to a file; a Clear button, which clears the text boxes; and an Exit button. Write code in the Form_Load event handler that allows the user to enter the name of the file. If the file does not exist, a new one will be created. If the file already exists, the input data will be appended to the file. Figure 9-30 Employee Data form for saving employee records Form1.vb [Design] X Employee Data Enter Employee Data First Name: Middle Name: Last Name: Employee Number: Department: Telephone: X
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 4 images
For the department combox, there needs to be a drop list for Accounting, Administration, Marketing, MIS, and Sales to choose from. How do I insert this into the program in visual basic ?
For the department combox, there needs to be a drop list for Accounting, Administration, Marketing, MIS, and Sales to choose from. How do I insert this into the
For the part, Dim sw As StreamWriter = File.AppendText(fileName). It says the file isnt declared. Why? and how do I fix this?
For the code for the txt file.
Dim sw As Streamwriter = File.AppendText(fileName)
I get an error for the file.AppendText(fileName). How do i fix this.
What about the txt file that saves and records the data that is imputted?