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

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter5: The Repetition Structure
Section: Chapter Questions
Problem 12E
icon
Related questions
Question
How would I create this in Visual Basic along with the txt form to collect the employee data?
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:
Transcribed Image Text: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:
empdata.txt x
1 Ada
2 A
Make sure to test your project by entering a new text
file name, and then to confirm you are appending data
to the file, run the program again and enter the same
text file name.
3 Adams
4 A1111
5
6
Save Record
You can confirm that the records you entered are in the
file. See attached graphic. Assume that the text file
name the user created was empdata.txt
Creating Employee Data - Microsoft Visual Studio
Eile Edit View Project Build Debug Team Tools Test Analyze Window Help
- O
22
Debug
▾ x86
▶ Start II
7
8
Employee Number:
Department:
Telephone:
Extension:
E-mail Address:
9
Accounting
9417775555
555
Clear
AAdams@abc.net
+
Exit
Solution Explorer
on os CE
Search Solution Explorer (Ctrl+
▷ References
A
D
4
bin
Debua
empdata.txt
Employee Data Part 1.exe
Employee Data Part 1.pdb
Employee Data Part 1.vshost.exe
Employee Data Part 1.vshost.exe.manifest
Employee Data Part 1.xml
Release
O Show all files
obj
Form1.vb
Transcribed Image Text:empdata.txt x 1 Ada 2 A Make sure to test your project by entering a new text file name, and then to confirm you are appending data to the file, run the program again and enter the same text file name. 3 Adams 4 A1111 5 6 Save Record You can confirm that the records you entered are in the file. See attached graphic. Assume that the text file name the user created was empdata.txt Creating Employee Data - Microsoft Visual Studio Eile Edit View Project Build Debug Team Tools Test Analyze Window Help - O 22 Debug ▾ x86 ▶ Start II 7 8 Employee Number: Department: Telephone: Extension: E-mail Address: 9 Accounting 9417775555 555 Clear AAdams@abc.net + Exit Solution Explorer on os CE Search Solution Explorer (Ctrl+ ▷ References A D 4 bin Debua empdata.txt Employee Data Part 1.exe Employee Data Part 1.pdb Employee Data Part 1.vshost.exe Employee Data Part 1.vshost.exe.manifest Employee Data Part 1.xml Release O Show all files obj Form1.vb
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 4 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

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 ? 

Solution
Bartleby Expert
SEE SOLUTION
Follow-up Question

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

Solution
Bartleby Expert
SEE SOLUTION
Follow-up Question

For the part, Dim sw As StreamWriter = File.AppendText(fileName). It says the file isnt declared. Why? and how do I fix this?

Solution
Bartleby Expert
SEE SOLUTION
Follow-up Question

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. 

Solution
Bartleby Expert
SEE SOLUTION
Follow-up Question

What about the txt file that saves and records the data that is imputted? 

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Data Binding
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage