<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1170" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>My code creates the table in the FE, which, if it's
a temp table, is where you want it. Yes?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I didn't do anything special - it just seems to be
the default. Wait. I SET db=CurrentDb which I believe points to the
front end. Are you setting the db that you run the execute against to the
FE or the BE. The table should end up wherever the db is pointing. I
think...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Rocky</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Rocky</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=actebs@actebs.com.au href="mailto:actebs@actebs.com.au">ACTEBS</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=accessd@databaseadvisors.com
href="mailto:accessd@databaseadvisors.com">accessd@databaseadvisors.com</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, June 09, 2003 8:34 AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [AccessD] Create Temp Table
from Recordset</DIV>
<DIV><BR></DIV>
<DIV><SPAN class=866282815-09062003><FONT face=Arial color=#0000ff
size=2>Rocky,</FONT></SPAN></DIV>
<DIV><SPAN class=866282815-09062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=866282815-09062003><FONT face=Arial color=#0000ff size=2>But
how did you tell it which DB you wanted to create the table in? I tried the
db.execute....method but it created the table in the BE which is something I
don't want. That's why I stopped using the SELECT ....IN clauses and just
created the recordset hoping I could save it locally as a table. The reason
is, the users can save the FE anywhere and run it so the IN portion of the
Make Table syntax won't work. </FONT></SPAN></DIV>
<DIV><SPAN class=866282815-09062003></SPAN><SPAN
class=866282815-09062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=866282815-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>Rocky
Smolin - Beach Access Software<BR><B>Sent:</B> Tuesday, 10 June 2003 1:20
AM<BR><B>To:</B> accessd@databaseadvisors.com<BR><B>Subject:</B> Re:
[AccessD] Create Temp Table from Recordset<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Vlad:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I just did this by creating a make table query
in the QBE and copying out the SQL code. I don't know if you can use
straight SQL to populate your table or you need to process through
code. I used db.execute instead of DoCmd.RunSQL to run the SQL so I
don't have to Set Warnings False. If you want to get rid of the table
afterwards - DROP tbl.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I don't know that if your make table SQL
doesn't return any records, it will create the table anyway as an empty
table but I think it will.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>HTH</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Rocky</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=actebs@actebs.com.au
href="mailto:actebs@actebs.com.au">ACTEBS</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=accessd@databaseadvisors.com
href="mailto:accessd@databaseadvisors.com">access group</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, June 09, 2003 7:48
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [AccessD] Create Temp Table
from Recordset</DIV>
<DIV><BR></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>
<P>
<HR>
<P></P>_______________________________________________<BR>AccessD mailing
list<BR>AccessD@databaseadvisors.com<BR>http://databaseadvisors.com/mailman/listinfo/accessd<BR>Website:
http://www.databaseadvisors.com<BR></BLOCKQUOTE></BLOCKQUOTE>
<P>
<HR>
<P></P>_______________________________________________<BR>AccessD mailing
list<BR>AccessD@databaseadvisors.com<BR>http://databaseadvisors.com/mailman/listinfo/accessd<BR>Website:
http://www.databaseadvisors.com<BR></BLOCKQUOTE></BODY></HTML>