>I see a few minor problems with the way you retrieve identity - I suggest to remove the line with select @@identity and add OUTPUT clause to the first insert statement, so you will have one less statement to run.
>
>Now, I also suggest to use text to lcSQL noshow instead of the one line - the query will be easier to read.
>Finally, if the above suggestions will not help much, as an experiment, you can use textmerge noshow in the above and use the actual values, e.g.
>
>text to lcSQL textmerge noshow
>insert into myAccessTable (field1, field2, field3)
>values (<<Val1>>, '<<Val2>>', '<<Val3>>')
>endtext
>
>The above is not recommended approach, I suggest it just to try.
Well, OK, I can try that, but note that the @@identity line is working fine; it's the INSERT for the second table that fails. Text To and TextMerge may make it look prettier, but will it change the result?
Ray Roper