open a recordset
Dim db as database, rst as recordset, SQL as string
Set db = CurrentDb
Set rst = db.OpenRecordset("YourNewTable"
then to get data from a main form its:
me![Textboxname]
from a subform its
me![subformname]![Textboxname]
'Add a new record
rst.addnew
rst!Name = me![Name] ' < just sample of how main form
rst!Invoice = me![subformname]![Invoice] ' < just sample of how subform
rst.update ' if you have a addnew you must have a update
'or
rst.edit 'is how to update a field
rst!name = me![Name]
'and then
rst.update 'is required when all done updating.
rst.close ' its always a good idea to close things up when all done this closes the recordset
db.close 'this closes the database
DougP, MCP
dposton@universal1.com
Ask me how Bar-codes can help you be more productive.