<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=456273915-09062003><FONT face=Arial color=#0000ff
size=2>Vlad,</FONT></SPAN></DIV>
<DIV><SPAN class=456273915-09062003></SPAN><SPAN class=456273915-09062003><FONT
face=Arial color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=456273915-09062003><FONT face=Arial color=#0000ff size=2>When
using the QBE grid to create the SQL statement, go to the properties of the
query and change the source database to point to the remote DB. Then when
you go to add tables, the list of tables in the remote database should show up
in the list. When you do this your SQL statement should look something
like the following:</FONT></SPAN></DIV>
<DIV><SPAN class=456273915-09062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=456273915-09062003><FONT face=Arial color=#0000ff size=2>SELECT
tblRemote.PlanRefNum, tblRemote.AllianceFundName, tblRemote.Cusip INTO
tblTMP<BR>FROM tblRemote IN 'f:\access\RemoteDB.mdb';</FONT></SPAN></DIV>
<DIV><SPAN class=456273915-09062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=456273915-09062003><FONT face=Arial color=#0000ff
size=2>tblRemote is the table you are pulling data from in
f:\access\RemoteDB.mdb, tblTMP is the new table being
created.</FONT></SPAN></DIV>
<DIV><SPAN class=456273915-09062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=456273915-09062003><FONT face=Arial color=#0000ff
size=2>Rusty</DIV>
<DIV><BR></DIV></FONT></SPAN>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> ACTEBS
[mailto:actebs@actebs.com.au]<BR><B>Sent:</B> Monday, June 09, 2003 10:13
AM<BR><B>To:</B> accessd@databaseadvisors.com<BR><B>Subject:</B> RE: [AccessD]
Create Temp Table from Recordset<BR><BR></FONT></DIV>
<DIV><SPAN class=412040915-09062003><FONT face=Arial color=#0000ff
size=2>John/Rusty,</FONT></SPAN></DIV>
<DIV><SPAN class=412040915-09062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=412040915-09062003><FONT face=Arial color=#0000ff size=2>I
don't think I explained myself very well. I have a remote DB not linked to my
FE. I could create a stored query, but it won't run because the tables are not
linked. What I need to do is create the table from the recordset that I've
created so I can work on the data locally and bind it to a
report.</FONT></SPAN></DIV>
<DIV><SPAN class=412040915-09062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=412040915-09062003><FONT face=Arial color=#0000ff size=2>Any
other suggestions?</FONT></SPAN></DIV>
<DIV><SPAN class=412040915-09062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=412040915-09062003><FONT face=Arial color=#0000ff
size=2>Vlad</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com] <B>On Behalf Of </B>John
Colby<BR><B>Sent:</B> Tuesday, 10 June 2003 12:59 AM<BR><B>To:</B>
accessd@databaseadvisors.com<BR><B>Subject:</B> RE: [AccessD] Create Temp
Table from Recordset<BR><BR></FONT></DIV>
<DIV><SPAN class=279525714-09062003><FONT face=Arial color=#0000ff size=2>do
it with the SQL statement directly</FONT></SPAN></DIV>
<DIV><SPAN class=279525714-09062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=279525714-09062003><FONT face=Arial color=#0000ff
size=2>Create a make table query using the query wizard and then look at the
syntax in SQL view.</FONT></SPAN></DIV>
<DIV> </DIV>
<P><FONT size=2>John W. Colby<BR>www.colbyconsulting.com</FONT> </P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com]<B>On Behalf Of
</B>ACTEBS<BR><B>Sent:</B> Monday, June 09, 2003 10:48 AM<BR><B>To:</B>
access group<BR><B>Subject:</B> [AccessD] Create Temp Table from
Recordset<BR><BR></FONT></DIV>
<DIV><SPAN class=876254314-09062003><FONT face=Arial
size=2>Guys,</FONT></SPAN></DIV>
<DIV><SPAN class=876254314-09062003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=876254314-09062003><FONT face=Arial size=2>Is there a
method of creating a temp table in your DB from a recordset?
eg:</FONT></SPAN></DIV>
<DIV><SPAN class=876254314-09062003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=876254314-09062003><FONT face=Arial size=2>dim strSQL as
string</FONT></SPAN></DIV>
<DIV><SPAN class=876254314-09062003><FONT face=Arial size=2>dim db as
dao.database</FONT></SPAN></DIV>
<DIV><SPAN class=876254314-09062003><FONT face=Arial size=2>dim rst as
dao.recordset</FONT></SPAN></DIV>
<DIV><SPAN class=876254314-09062003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=876254314-09062003><FONT face=Arial size=2>strSQL = "SELECT
someTable etc etc etc"</FONT></SPAN></DIV>
<DIV><SPAN class=876254314-09062003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=876254314-09062003><FONT face=Arial size=2>set db =
opendatabase("some remote DB")</FONT></SPAN></DIV>
<DIV><SPAN class=876254314-09062003><FONT face=Arial size=2>set rst
=db.openrecordset(strsql)</FONT></SPAN></DIV>
<DIV><SPAN class=876254314-09062003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=876254314-09062003><FONT face=Arial size=2>with
rst</FONT></SPAN></DIV>
<DIV><SPAN class=876254314-09062003> <FONT face=Arial
size=2>make a new table in my db from the recordset</FONT></SPAN></DIV>
<DIV><SPAN class=876254314-09062003><FONT face=Arial size=2>end
with</FONT></SPAN></DIV>
<DIV><SPAN class=876254314-09062003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=876254314-09062003><FONT face=Arial size=2>I've never had
to do this and have wasted heaps of time on this. Any help will be much
appreciated...</FONT></SPAN></DIV>
<DIV><SPAN class=876254314-09062003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=876254314-09062003><FONT face=Arial
size=2>Thanks</FONT></SPAN></DIV>
<DIV><SPAN class=876254314-09062003><FONT face=Arial
size=2>Vlad</FONT></SPAN></DIV>
<DIV> </DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>