bw******@lucent.com (Bill W.) wrote in message news:<c3**************************@posting.google. com>...
I almost hate to ask this, it's so trivial. I am writing some code to
read a text file and place certain records (based on key words in the
file) into a form and table. I have the code written that reads the
text-file and parses out the keywords. What I can't remember (and all
my books are at home at the moment) is how to get the data into my
table and ultimately into my form.
Can someone point me to a code snippet someplace ? I sure would
appreciate it as I don't do this very often and just can't remember
the syntax.
TIA
Bill W
Whoa. Tables *store* data. Forms are for people to read/modify/enter
data into a table. Or are you automating data entry somehow here?
If you have code that reads and parses text file, why not just create
an append-only recordset and write your data straight to the table?
Is there a reason you need the form? (Well, except for indicating to
the user that "yes, my code is running. Please do not turn this
computer off!")
Look up the .AddNew method in the help. You may have to open a module
so you can get to the VBA help. There are tons of examples there. If
you're writing through to a linked SQL Server table, use ADO,
otherwise, it doesn't matter - you can use DAO.