Hi.
I know there is the tool of Access to create a Master MDB with copies
which can be synchronized later on. Sometimes I forget to do this..
In short: Is it possible make access two tables having the same fields
from totally different independent mdb files?
In case it's not I've tried to implement some little script.
Having two tables:
Left table:
ID Text
1 one
2 two
4 five
right table:
ID
2 two
4 four
my script creates another table containing
L/R = left/ right table of comparism
action L_ID R_ID L_Text R_Text
1 one
4 4 five four
where you can specify
Quote:
copy left to right (and perhaps create it)
copy right to left
|
dl delete left
dr delete right
This way it should be really easy to synchronize some changes..
But I have some problems implementing it..
I'm not sure..
First of all I use DAO to get a list of tables of both mdb files.
Then I get the field lists and extract the primary fields.
The next step is creating the table which contains the "diff".
After creating this table I'm closing and showing it:
dim vergl As DAO.tabledef
vergl=CurrentDB.CreateDB("Vergleich")
[...]
vergl.close
DoCmd.OpenTable Vergleich
The odd thing here:
Access tells me that it can't find this table and it ask my to stop or
to go to debug mode. After going to debug mode I can reexecute this
command with pressing F5 .. Now the table pops up (??)
But I don't know how to show this table in a modal way.
DoCmd.OpenTable DiffTable does show it, but the programs continues..
So I've tried to make quick hack:
Public Sub WaitForUser()
Me.ready.SetFocus=False ' Me.ready is checkbox control on the form
do while not Me.ready.Value
DoEvents
Next
End Sub
Is there some other way?
Another ugly thing that Access says after running my script that I don't
have enough privileges to save my work any more .. (I don't mind,
copying the text and restarting WinXP works) I'm not sure wether it's
the right translation because I'm German and I'm using the German
translation of Access.
I'm not sure wether some is intersted in my piece of code and wether I
should paste it here (actually it's a form with most function names
beeing German. I could translate them)
What do you think?
Marc