Warsteiner99
asked on
Saving to a database
what is the code that could be used that when a button is pressed takes information in text3.text and text4.text and saves it into a database, witht txt3.text going into the "surname" field, and text4.text going into the "number" field.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Dim dbs as database
dim rst as recordset
set dbs=opendatabase(filename)
set rst=dbs.openRecordset("Sel
rst.edit
rst.add
rst.fields("surname")=text
rst.fields("number")=text4
rst.update
'If you wish to save as a new record.
'filename is the *.mdb name and path
'Tablename is the name of the table where the fields surname and number are found
'If you wish to save the data in an existing record you will need some more code.