Employee data using structures,arrays and multiple forms

Posted on 2007-10-14
Last Modified: 2013-11-26
I am using visual 2005 running windows xp. I am trying to create an application that allows a user to enter to enter employees info: first,middle,last name, employees number, phone, extension, department, and email address. I have a combo box for the departments;a save record button(which writes thr record to a file) clear button,and an exit button. then i have another form that reads the records stored in the previous application file. I am stuck on how i should get started. this is what i have so far

Public Class frmMain

    Structure employeesinfo
        Dim empnum As Integer
        Dim empfirst As String
        Dim empmid As String
        Dim emplast As String
        Dim empDept As String
        Dim empphone As Integer
        Dim empEmail As String
        Dim empext As Integer

    End Structure

    Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
        Dim filename As String
        Dim count As Integer
        Dim employees As employeesinfo
        Dim employeesinfo As System.IO.StreamWriter
        employeesinfo = System.IO.File.CreateText("employeesinfo.text")


    End Sub

    Private Sub frmMain_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim employeesinfo As System.IO.StreamWriter
        employeesinfo = System.IO.File.CreateText("employeesinfo.text")

    End Sub

End Class

I am stuck on where i am suppose to place the streamwriter in the save record  or load procedure.

Question by:twoshortm
    1 Comment
    LVL 21

    Accepted Solution

    Have you thought about using a database like MSAccess instead?

    Anyways about your question of being able to access the file created from another form, where are you stuck? what problems are you facing?

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (…
    For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now