473,387 Members | 1,624 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Maintaining Themes When Creating A New Version of an Existing DB

I am using Access 2016

I have a DB I am developing for a client. I have created 3 environments, Development, Test and Live(Production).

The forms in this database use an office theme (retrospect) to match the companies branding.

I have a routine that I run to copy the Database Objects from Development into Test and then Test into Live.

It all works well except that the theme I use in Dvelopment gets lost when I copy the objects from one environment to another. The theme defaults to the default office theme.

Is there a way using VBA that I can control what office theme is used when I create a new Database through VBA

Heres how I copy from one environment to another.

1. I kill the old back up version of the database
2, I rename the existing db as dbnameBackUp
3. I create an empty database
4. I copy all the objects from the current db into the new db.

This may not be stated very clearly so please let me know if I can clarify in any way.

Thanks in advance,

m
Jan 15 '19 #1

✓ answered by twinnyfo

That is a highly inefective method that is just asking for problems to occur.

What you should do is have a front end that connects to local data. Then, when you are ready to publish it, make it into and .accde and relink the tables to the network location. Then publish the database for users.

This will always preserve the theme and appearance, no matter what.

Let me find the several links here that address this.

16 1266
twinnyfo
3,653 Expert Mod 2GB
That is a highly inefective method that is just asking for problems to occur.

What you should do is have a front end that connects to local data. Then, when you are ready to publish it, make it into and .accde and relink the tables to the network location. Then publish the database for users.

This will always preserve the theme and appearance, no matter what.

Let me find the several links here that address this.
Jan 15 '19 #2
twinnyfo
3,653 Expert Mod 2GB
I found them -- a lot easier than I thought.

Working with Front and Back Ends

Updating Users with New Front Ends (particularly posts #5 and #8).
Jan 15 '19 #3
Thanks much for your response! This looks like it will work well for me. I already have the database split into front end and back end.

Here are two things that are perhaps worth mentioning.

1. For some reason I am unable to create an .accde file from this database. (I had planned to do some research on this problem.)

2. I may not be the person who is maintaining this project since I am working as a contractor. I need to make this as "bullet proof" as possible.

I had planned on giving my successor a button in the development db that promoted all the changes they made up to the Test environment and likewise from the test environment to the "Live" environment.
Jan 15 '19 #4
twinnyfo
3,653 Expert Mod 2GB
Concerning #1:
You may have to create a brand new database, import all the objects and then create the .accde. But, remember, you always want to do that as a separate action.

For my DBs, I create the front end, linked to local "working" tables, so I never mess with live data while I am tinkering. Then I save as a .accde. Within my db, I have an administrator form. One of the buttons available will "publish" the db. It does the following:
  1. It sets the start up Form
  2. It establishes several DB startup options that aren't very handy when you are working on a db, such as preventing menus from popping up and I also disable the close button.
  3. It relinks this .accde to the networked data, so that it now affects the "live" data.
  4. It updates the "version number" as mentioned above.
  5. It compacts itself.
  6. It copies itself to the network location, so that anyone opening the db now downloads the latest version.

Concerning #2:
I cannot agree more. Do not allow your DB users to do anything that they shouldn't be able to do. I have too many folks around here who know just enough about Access to be dangerous and they have open, uncompiled, non-Front-ended, non-locked DBs that people can do just about anything to (they could delete a table if they wanted to--the TABLE; not the link to it!). There are countless trick of the trade for what you want.
Jan 15 '19 #5
Thanks TwinnyFO!

I've done much of what you mentioned above but I'll give the fix to the accde issue a shot.

Thanks again!
Jan 15 '19 #6
twinnyfo
3,653 Expert Mod 2GB
Glad we could be of some service.
Jan 16 '19 #7
Well, another day and despite everything I've tried I am still unable to create an accde file from this database. I have tried the method you mentioned above and still no luck. I even tried creating one of "canned" template databases (the contacts DB) and saving it as an accde to make sure it wasn't something about the environment I'm working in but I was able to do that fine. Any ideas?

As far as I can tell there is nothing wromg with any of the code I have in the database and there are only 4 tables (all linked) so I don't think that is the problem either. ~stumped~
Jan 16 '19 #8
twinnyfo
3,653 Expert Mod 2GB
So, in Access 2016, when you go to File, Save As, you have no option to "Make ACCDE"?

If that is the case, your network adminstrators may have somehow disabled that functionality?

It is possible to work with a DB without making a .accde file, but I'm not sure I would feel comfortable with it.
Jan 16 '19 #9
Yes, Access 2016 allows you to save an accdb DB as an accde file in the save as dialog. I thought that perhaps the admins had locked the functionality down as well but when I tried it with one of the MS Access template databases I was able to do it. It appears to be something with this particular database or perhaps with any database with linked table ~scratching my head~
Jan 16 '19 #10
I did a little more digging and it appears to be something with this database as opposed to any database with linked tables. I guess I'll just have to work with the accdb file.

Thanks again, you have been a tremendous help!

m
Jan 16 '19 #11
twinnyfo
3,653 Expert Mod 2GB
Are you receiving an error when you try to make the ACCDE?

I'm going somewhere with this....
Jan 16 '19 #12
Not precisely, I get an information Dialog box that says Access Was unable to create the accde file (no error number). There is a button to show the help message and when you do you get the following info:

This error is usually associated with compiling a large database into an MDE file.* Because of the method used to compile the database, a considerable number of TableID references are created for each table.* The Access database engine can only create a maximum of 2048 open TableIDs at one time.* Exporting a database as an MDE potentially can exceed this limit if the database has a large number of objects (table, macro, form, report, etc).
There is no accurate method to estimate the number of TableIDs the Access database engine uses during the process of compiling a database as an MDE.* However, each VBA module and each form uses one TableID, as a result, if the database has 500 forms, and each form's HasModule property is set to Yes, as many as 1,000 TableIDs are used.
Jan 16 '19 #13
PhilOfWalton
1,430 Expert 1GB
I don't know if this is of any help, but I have had this error under 3 circumstances.

1) The code has not compiled correctly even though the compiler
reports it is OK.
To cure this, create a new DB and import
everything from the old Db into it and compile your new DB.

2) A module name is the same as a Function or Sub Name.
Cure:- Prefix all Module Names with Mdl...

3) If you are using a library database (under references), this
must be an AccDe, not an AccDb.

Phil
Jan 16 '19 #14
twinnyfo
3,653 Expert Mod 2GB
I was going to mention that you should click the compile option in the debug menu of your VBA editor. Resolve any issues and then try making ACCDE again.
Jan 16 '19 #15
I'm not sure who to thank the most so thank you both equally! ;0)

It was a totally amateur bonehead mistake. I had not even compiled the database at all. When I did it found a broken reference and once I fixed that I was able to create the accde file with no problem at all which will in turn fix the other problems I was experiencing!

You guys ROCK!!!
Jan 16 '19 #16
twinnyfo
3,653 Expert Mod 2GB
Phil just beat me to it because I saw your note as soon as I stepped out for lunch!

But he's got a good head on his shoulders. He'll lead you down the good path!
Jan 16 '19 #17

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: CroDude | last post by:
Heya all! I have a weird problem when creating a texture brush in a Paint event. When program gets to the line where I'm creating a new TextureBrush object, it crashes with OutOfMemory...
2
by: Mark Perona | last post by:
I created an ASP.net form with an editable datagrid on it. I can create new records, and update and delete existing records. The problem I have is that I want a field in the grid to be editible...
2
by: Patrick Spence | last post by:
(sorry 'bout the multipost) VS.NET 2003 v 7.1.3088 ..NET Framework v1.1.4322 XP Pro IIS 5.0 When I try to create a ASP.NET application, I get the following error... The Web server...
1
by: Eric Voigt | last post by:
are there special settings applied to IIS5, when creating a webService in VS.NET? I wonder - because when I create a webService (let's call it webservice1) using VStudio.NET on my remote W2K...
0
by: reidarT | last post by:
Ugyldig på toppnivået av dokumentet. Feil under behandling av ressursen file:///C:/VB/WebBrowser/WebBrowserControl/TESTFILE... "<?xml version=""1.0""?>","<XMLTest>" ^FileOpen(1,...
1
by: ReidarT | last post by:
The former post was wrong, the lines where concatenated so here it goes again. I am wrriting to a file (XML-format) and using FileOpen(1, "C:\vb\WebBrowser\WebBrowserControl\TESTFILE.XML",...
4
by: Don | last post by:
When creating a new region for a control via a GraphicsPath object, it appears the entire rightmost column of pixels and bottom most row of pixels are not included in the region. I will try to...
7
by: Aj-India | last post by:
Is there anyway that I could preserve the comments when creating an SP from Command Editor,so that when i import the SP in the development center I can see them. The reason for such a request is...
9
by: Joe Penora | last post by:
Hi All, How to add the HTML script when creating new ASPX page. After it is done I may need to add some Meta tags etc... but the html script is not there. Is there an option in the ASP.NET...
3
by: accessdude | last post by:
Hello, I'm trying to pre-populate a foreign key field when creating a record; whether creating a new record in the table itself or a form. table 1 = Clients table 2 = Invoices table...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.