G
Guest
Thank you all for any suggestion that you can provide.
Question:
In a front end/back end database configuration how can a table be copied
from another table within the back end database and then re-linked to the
front end database?
When I issue the commands below, the table gets copied to the Front End
database instead of within the Backend database where I need it to be..
More explanations about the database are further down, below the code example.
Current CODE
'-- Deleting Main Table so that Autonumber ID# can start from 1 again when
importing new data. This table is originally a linked table
DoCmd.DeleteObject acTable, "tblProperties"
'--- Copy empty table from Template - (This ends up being a local table).
DoCmd.CopyObject , "tblProperties",acTable, "tblPropertiesTemplate"
'--- Populate empty table with append query
stDocName = "qryPropertiesGenerateNew"
DoCmd.OpenQuery stDocName, acNormal, acEdit
_________________________________________________
Background Details about the database.
I have a database in which some tables are periodically repopulated with new
data downloaded from the internet. Users then select and manipulate such
data independently from one another in the local machine.
To avoid rapidly escalating Autonumber IDs, (as it would happen if the
content of the tables were first deleted and then repopulated with an append
query), I simply delete the tables and then copy brand new tables from empty
templates.
This works fine, as long as Forms/Queries and Tables are contained within
the same database on each user PC.
In order to continue development, I have now split the database so that I
can provide users with updated Front ends without affecting the data they
have manipulated on their own PC. Each PC therefore has a Front end and a
Backend database in the same folder.
The problem is now that at import time, when the linked tables are deleted
and then recreated by copying them from the templates, the recreated tables
end up in the Front end database instead than in the linked database.
At this point the user sees everything normal, but he is actually using data
from new tables within the front end instead of linked tables in the back
end.
As a result, the next time I provide the user with a new Front end database,
those local tables get overwritten.
Any suggestion that you can provide is appreciated.
Gino
Question:
In a front end/back end database configuration how can a table be copied
from another table within the back end database and then re-linked to the
front end database?
When I issue the commands below, the table gets copied to the Front End
database instead of within the Backend database where I need it to be..
More explanations about the database are further down, below the code example.
Current CODE
'-- Deleting Main Table so that Autonumber ID# can start from 1 again when
importing new data. This table is originally a linked table
DoCmd.DeleteObject acTable, "tblProperties"
'--- Copy empty table from Template - (This ends up being a local table).
DoCmd.CopyObject , "tblProperties",acTable, "tblPropertiesTemplate"
'--- Populate empty table with append query
stDocName = "qryPropertiesGenerateNew"
DoCmd.OpenQuery stDocName, acNormal, acEdit
_________________________________________________
Background Details about the database.
I have a database in which some tables are periodically repopulated with new
data downloaded from the internet. Users then select and manipulate such
data independently from one another in the local machine.
To avoid rapidly escalating Autonumber IDs, (as it would happen if the
content of the tables were first deleted and then repopulated with an append
query), I simply delete the tables and then copy brand new tables from empty
templates.
This works fine, as long as Forms/Queries and Tables are contained within
the same database on each user PC.
In order to continue development, I have now split the database so that I
can provide users with updated Front ends without affecting the data they
have manipulated on their own PC. Each PC therefore has a Front end and a
Backend database in the same folder.
The problem is now that at import time, when the linked tables are deleted
and then recreated by copying them from the templates, the recreated tables
end up in the Front end database instead than in the linked database.
At this point the user sees everything normal, but he is actually using data
from new tables within the front end instead of linked tables in the back
end.
As a result, the next time I provide the user with a new Front end database,
those local tables get overwritten.
Any suggestion that you can provide is appreciated.
Gino