Linked Table Question

funderburgh

Registered User.
Local time
Today, 14:45
Joined
Jun 25, 2008
Messages
118
I manage a distributed application with split databases - multiple users, one server.

I have added a function to the application that requires the deletion and re-build of a table through a make table query.

The test version of the application does not create linked tables in this process. The table in question starts out as a linked table and winds up unlinked after the query is run.

I am running the query in VB with a DoCmd.

Any help is welcome.
 
Why delete and rebuild the table? Why not just delete the data and then append new data? Does the table definition change each time? If not, don't delete.
 
As usual Bob, you are right on the money, but I can't find VB to do that, I.E. a DoCmd method.
 
To delete from a table:
Code:
Dim strSQL As String

strSQL = "DELETE * FROM TableNameHere"

CurrentDb.Execute strSQL, dbFailOnError

Then create an Append Query and call it using:

Code:
DoCmd.SetWarnings False
DoCmd.OpenQuery "YourAppendQueryNameHere"
DoCmd.SetWarnings True
and you should put
DoCmd.SetWarnings True
in the exit area of your sub.
 
OK, I owe you half my paycheck again. Its a shame that I'm a volunteer.
 

Users who are viewing this thread

Back
Top Bottom