Link to home
Start Free TrialLog in
Avatar of mtbuford
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
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
public sub command1_click()
   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
Avatar of mtbuford
mtbuford

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?
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.