Public Function to overwrite tables

G

Guest

Hi

I have a really simple public function to overwrite a few table from the
server to a lap. Well "should be" simple.

Public Function Wayne
DoCmd.DeleteBject acTable, "TableABC"
DoCmd.DeleteBject acTable, "TableXYZ"
DoCmd.TransferDatabase acImport, Etc, etc, etc TableABC
DoCmd.TransferDatabase acImport, Etc, etc, etc TableXYZ
End Function

But of course this will not work as the tables are linked in relationships
so can't be deleted by this method.

An append query to update the data will not work as some of the tables are
altered between transfers (the server is always correct so I need to
overwrite the table on the laptops - there are over 40 of them)

Has anyone got any hints how to overwrite a table and maintain the
relationships -
 
D

Douglas J. Steele

You should split your application into a front-end and a back-end, Wayne.
You wouldn't have these problems then: you'd simply copy the entire
back-end, and replace whatever's there.
 
G

Guest

Hi Douglas

Thanks for getting me to me. All the offices (manchester, belfast, london,
cardiff) are running front end on all terminals. The only problem we have is
that we have lots of laptops that are taken out on site. The tables on the
server change (when I get round to it) so the laptops that may not be used
for a few weeks sometimes need changeing. Thats not hard BUT just make
things more interesting (to stop users messing about with "stuff" the
function is being called (via a shell) from a seperateDB on each laptop.

I know bit strange but it works for us.

The problem I have is deleteing table via a function when they are linked

Any ideas

--
Wayne
Manchester, England.



Douglas J. Steele said:
You should split your application into a front-end and a back-end, Wayne.
You wouldn't have these problems then: you'd simply copy the entire
back-end, and replace whatever's there.
 
D

Douglas J. Steele

I don't understand why you can't just make a new copy of the back-end.

You may want to look into Replication.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Wayne-I-M said:
Hi Douglas

Thanks for getting me to me. All the offices (manchester, belfast,
london,
cardiff) are running front end on all terminals. The only problem we have
is
that we have lots of laptops that are taken out on site. The tables on
the
server change (when I get round to it) so the laptops that may not be used
for a few weeks sometimes need changeing. Thats not hard BUT just make
things more interesting (to stop users messing about with "stuff" the
function is being called (via a shell) from a seperateDB on each laptop.

I know bit strange but it works for us.

The problem I have is deleteing table via a function when they are linked

Any ideas
 
G

Guest

Hi Douglas

If I replicate the DB XYZ the new name will be Replica of XYZ
and this means the user having to either rename it or change the Switchboard
vba that I have set up for them. Both "Very" bad ideas.
 
G

Guest

Ok then - I take all you points as correct. Will look at it another way.

Can I completly delete the DB using code from another DB (I would simply
code an OnClick event or something) and then paste a new copy. I will need
to code this so they don't have to do anything - I could give them a CD with
the new copy on my post or even e mail.

As you can tell I am strugleing with this. I have tried asking users to do
even basic "stuff" and to say some of the get it wrong would be an
understatement.

Any ideas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top