I dont think Im far off, I can get the program to alter a specific record but it seems to overwrite previous records in the array. Ive set the array to have 10 records and I think the flaw is in the 3 section of the FilePut instruction, ideally I want to put the changes only on the selected record, input by the user in the 'modify_txt.Text' textbox.

This is the button the user clicks after entering in the chosen record number of the array to modify...

Link = modify_txt.Text

        EmployeeRec(Link).Employeeid = Val(employeeid_txt.Text)
        EmployeeRec(Link).Firstname = firstname_txt.Text
        EmployeeRec(Link).Surname = surname_txt.Text
        EmployeeRec(Link).Details.Age = Val(Age_txt.Text)
        EmployeeRec(Link).Details.Gender = gender_txt.Text
        EmployeeRec(Link).Position = position_txt.Text


       
        FileOpen(1, "s:\vb.net\employee.txt", OpenMode.Random, , , Len(EmployeeRec(Link)))
        FilePut(1, EmployeeRec(Link), CurrentRec)
        FileClose(1)

Okay playing around some more I can definitely get it to modify one record but the problem occurs when I have more than one record in the array.

Could this be the problem? Ive set these at global level ::

Dim Index As Integer = 0
    Dim EmployeeRec(10) As EmployeeType
    Public CurrentRec As Integer

No Im wrong, it still appears to modify the last record entered whereas I would like to select a specific record on file....

Thanks for all the $cough$ help.

I was able to work it out myself :icon_cheesygrin: .

This question has already been answered. Start a new discussion instead.