Copy field value to a table

mlopes1

Registered User.
Local time
Yesterday, 22:06
Joined
Sep 4, 2002
Messages
76
I am having major brain failure here...

I have a form whose record source is table1 and contains about 25 fields. If a user edits the value of a certain field (field1) they are given the option of saving this new value separately. If they want to save it, then the value, along with a second (field2) should be stored in a separate table (table2). But because it is also to be stored in Table1, I can not make the fields control source = to the table2 field name.

I have everything working EXCEPT, I can not remember for the life of me how to append the current values of fields 1 and 2 to table 2 if the user chooses that! It seems so simple, and probably is, but I just can't think of it...

Thanks in advance for your help,

Marco
 
You could use an SQL Insert statement to add the values to your second table.

currentdb().execute "INSERT INTO MyTable (field1, field2)
VALUES (value1, value2)"

Hope this helps,
 

Users who are viewing this thread

Back
Top Bottom