View Single Post
  #1  
Old September 8th, 2004, 12:28 AM
Bryan Hughes
external usenet poster
 
Posts: n/a
Default Create Local Table

Hello,

I have a table with a fe for users and be that holds just my tables

I have code that will create tables, but it creates them in the be and links
them, not in the fe where I want them to be used as temp tables and deleted
on opening and closing of the fe.

I use the fExistTable function to check if the table exists.

Then I run this sub from a class module:
Sub sClean_Local_Client()
On Error GoTo ErrorHandler
gstrSubProcName = "sClean_Local_Client()"

'Check to see if Local Client temp table exists
gblnTest = fExistTable("tblClient_Local_Temp")

'If table exists the clean information from table
If gblnTest = True Then
strSQL = "DELETE * FROM tblClient_Local_Temp;"

DoCmd.SetWarnings False
DoCmd.RunSQL strSQL
DoCmd.SetWarnings True
Else
'if table does not exist then create it
DoCmd.CopyObject , "tblClient_Local_Temp", acTable,
"tblUSys_Client_Local"
End If

.. . .
End Sub

How can I make this table in the always be created in the users local fe and
not the be?
-TFTH
Bryan