View Single Post
  #38  
Old January 28th, 2009, 09:28 PM posted to microsoft.public.access.forms
Orna
external usenet poster
 
Posts: 18
Default Dynamic recordset

Setting the forms' recordsource sound even better, I'll try that.
BTW, when I tried to join the two tables from the two different databases I
got an error, so I found a workaround.

is the following syntax possible at all?
SELECT field1,field2 from table1 in 'PATH1',table2 in 'PATH2'
WHERE table1.field1=table2.field2

Orna.


"David W. Fenton" wrote:

=?Utf-8?B?T3JuYQ==?= wrote in
:

Your post was very helpfull, I'm opening the recordset with the
following sql string:

SELECT ([export1].[SbjNum]) In (select doobloid from " &
sTableName & ") AS IsImported, * FROM export1 IN '" & sFilePath &
"\" & sFileName & "'"

It works great!


Much easier, no? I'm so glad you worked it out (as it can be kinda
complicated to get the connect strings and the derived table syntax
correct).

You might now consider not even bothering with a recordset, and
assigning this SQL string as the recordsource for your form in the
same place that you're now assigning the recordset.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/