How to Alter Code Programmatically

G

Guest

I have a situation where I need to update an Access application. The
application frequently requires updates to table data and I have had great
success doing this via an “Update Application†through linked tables. The
users of the application are not Access users so I have to keep everything
simple.

Currently the application requires a very small change to the code contained
in a module. Is there any way to do this programmatically via a linked
application?
 
D

Douglas J. Steele

There is a Module object that will let you manipulate specific lines of
code, but I think it would be far easier simply to replace the existing
module with the correct one.
 
T

Tim Ferguson

Currently the application requires a very small change to the code
contained in a module. Is there any way to do this programmatically
via a linked application?

Just issue a new front-end mdb, and get your users to copy it over their
current one. You can write a script to do it automatically as long as you
know where to find it on the users' machines.

Hope that helps


Tim F
 
G

Guest

Is there a way to script this replacement? I don't care about altering a
specific line of code. Copying and pasting the entire module would work for
me. I just don't want to have to explain to each remote user how to do the
replacement and worry about whether they did it correctly. The app is stored
in the same place on each users machine ("C:\Program
Files\AccessApp\AccessApp.mdb)
 
G

Guest

This is a good thought but how would I do this without replacing the data in
all the tables? The application has a large amount of data stored in it
currently and would require a cd to be sent to each user. Plus any user
specific data they have entered would be lost.
 
D

Douglas J. Steele

Tim specifically mentioned that you replace the front-end mdb.

Applications should always be split into a front-end (containing the
queries, forms, reports, macros and modules), linked to a back-end
(containing the tables and relations). Only the back-end should be on the
server: each user should have his/her own copy of the front-end, ideally on
his/her hard drive.
 
D

Douglas J. Steele

Tim's right: you should simply replace the front-end.

Split your application, even if it's only a single-user app, and you'll
avoid problems such as you're running into.

However, the answer to your specific question is "try the TransferDatabase
method".
 
G

Guest

I agree with the design suggestions and if I would have been the original
architect, that is how I would have designed it. Unfortunately, I've
inherited this app and have to deal with its design flaws as is for now.

Thanks
 

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