Adding Form data to a new/different table

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

Hi,

I'm a new Access user and have a question about Form Data
and how to send the value of a text box to another,
different table. I have a form that takes customer
information for our golf shop. One of the fields, or text
box, is for the customers email address which is stored
with the rest of his/her information in the main Customers
table. I would like to add a Command Button that will take
the value in the email text box and shoot it over to
another table which will be a stand alone source for our
mailing list. The reason for the stand alone table is that
we take customers email addresses to send them tracking
information and we ask them if we can add them to our
mailing list. If they say yes we add them to the list, but
if they say no, we need to keep that info seperate.

Jim
 
Hi,
The easiest way to handle this would be to have a boolean field in the one table
to indicate whether or not the customer was part of the mailing list.

If you insist on storing the data elsewhere:

Dim strSql as String

strSql = "Insert Into yourTable (email) Values('" & Me.yourtextBox & "')"

CurrentDb.Execute strSql, dbFailOnError

substitute the correct table and field names.
 
Thanks much, Dan. That worked well.

Jim

-----Original Message-----
Hi,
The easiest way to handle this would be to have a boolean field in the one table
to indicate whether or not the customer was part of the mailing list.

If you insist on storing the data elsewhere:

Dim strSql as String

strSql = "Insert Into yourTable (email) Values('" & Me.yourtextBox & "')"

CurrentDb.Execute strSql, dbFailOnError

substitute the correct table and field names.

--
HTH
Dan Artuso, Access MVP


"Jim" <[email protected]> wrote in
message news:[email protected]...
 
Back
Top