You would use an Append query. The basic syntax would be like;
"INSERT INTO TableB (Field1, Field2, Field3) SELECT Field1, Field2 " _
& "Field3 FROM TableA WHERE TableA.FieldX = """ & YourParsedString _
& """ OR TableA.FieldY = """ & YourParsedString & """;"
You can find more detailed info at;
http://msdn.microsoft.com/en-us/library/bb208861.aspx
--
_________
Sean Bailey
"Julie" wrote:
> Hi all
>
> I am new to using Access 2007 and have a question for you experts.
>
> I am interested in adding a new record and inserting some data from one
> table to annother, based on some rules.
>
> I have a long string and I want to, for each parsed section of the string (I
> have hthe parsing code working fine in visual basic) I want to search table
> A. Each time I find a record that contains the parsed phrase in either one of
> two fields, I want to append a new record to table B with the contents of a
> few of the fields from table A. I am not sure if this is something I can do
> with the query, or an Append command, or an Insert into command, it seems the
> query probably won't work and it needs to be coded. I come from a visual
> foxpro background and there I could have done an append from table A for ...
> I would appreciate any suggestions for how best to accomplish this in Access
> 2007/Visual Basic.
> Regards, (and HAPPY HALLOWEEN), Julieinstance, if a
> --
> Thanks for your help. Julie