mtbuford
asked on
Open a file and add entry
I need help with a program that will have 2 textboxes that when you put your initals in one and your last 3 digits of your SSN in the second one it opens a file named combined and writes a record in the XXX123 = XXX123 format. Everytime that this program is ran it will open the same file and write a new record to the file.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
When I use your answer TimCottee I get an object required when it gets to the part of writing the record to the file?
ASKER
When I use your answer TimCottee I get an object required when it gets to the part of writing the record to the file?
You should replace the txtInitials and txtSSN with the names of the textboxes that this information is recorded in.
writeRecord(text1.text & text2.text)
end sub
public sub writeRecord(strID as String)
Dim ff as Integer
ff = FreeFile
open strID for output as #ff
print #ff, "<i don't know exactly what you want to write to the file>"
close(ff)
end sub