joyfullservice / msaccess-vcs-addin

Synchronize your Access Forms, Macros, Modules, Queries, Reports, and more with a version control system.
Other
211 stars 41 forks source link

Does this tool work for MS Access 2007? #432

Closed Rod-at-DOH closed 1 year ago

Rod-at-DOH commented 1 year ago

Where I work there's an old Access 2007 app written by God only knows who. (I don't think even the users know who wrote it.) Anyway, the users are adamant about NEVER upgrading the app to any newer version of Access.

Therefore, since this tool is advertised to only go back to Access 2010, I conclude it might not work for our old Access app. But I thought it is at least worth the try to ask if this might work for Access 2007.

hecon5 commented 1 year ago

You can always try, I think there are some upgrade paths laid out by Microsoft a long while back to get you to a modern version.

Rod-at-DOH commented 1 year ago

All right, I'll give it a shot. At least if I mess anything up it will be my own copy of the MDB file.

Rod-at-DOH commented 1 year ago

Hi @hecon5, I was just on the Releases page, but didn't see any obvious link to download this extension. Perhaps it's there, in a format I'm not used to seeing. Where do I find it on the Releases page?

hecon5 commented 1 year ago

The file release type is "ACCDA", https://github.com/joyfullservice/msaccess-vcs-addin/releases/latest has the latest "Main" release, but you can also download a more recent version of the newest 4.x version. IIRC @joyfullservice is planning to build a new one fairly soon.

Personally, I'd use the 4.x first, and then the 3.x if that doesn't work. The release page has a .zip file with everything in it; see https://github.com/joyfullservice/msaccess-vcs-addin/wiki/Installation for instructions on how to install.

Rod-at-DOH commented 1 year ago

I've downloaded the .zip file, then extracted everything within it. I put the .accda file into a folder. Then I opened Access 365 (that's the version I have). I went into Options and found Add-ins. I selected that, changed the Manage to Access Add-ins, then I pressed the Go button. It brought up an Add-in Manager dialog, where I navigated to the .accda file. I selected the .accda file, then clicked the Install button. That resulted in giving me this error:

The add-in could not be installed because it is missing a USysRegInfo table

What have I done wrong?

hecon5 commented 1 year ago

Once you extract from the Zip file, simply run Version Control.ACCDA file, the file will move itself to the correct location for you and install things.

Rod-at-DOH commented 1 year ago

Huh? I didn't know you could do that. OK, I've run Version Control.ACCDA. However, when I ran it, I get this:

The active content in this file is blocked. Review your Trust Center settings or contact your IT administrator.

I might not be able to do anything about it as some of this is controlled by my IT security. But if I can, then what do I do within the Trust Center?

joyfullservice commented 1 year ago

This add-in has it's own built-in installer. As @hecon5 said, you just need to double-click the file, and click the button to install. It's that simple!

image

P.S. I just published an updated beta release with all the latest bells and whistles, so I would try that one first. (Version 4.0.21)

joyfullservice commented 1 year ago

If you see something like this:

image

...Then see if you can click the Enable Content button to continue. Best case scenario, you should be good to go. If not, take a look at the Trust Center settings in the Microsoft Access options. At a minimum, you will need to be able to enable macros to run.

I would suggest the following setting:

image

That will still prevent non-trusted applications from running, but allow you to enable content to use the integrated installer.

If that is still not working, you may need to discuss this with your IT staff to see what options will work in your environment. The following page in the Wiki may be helpful in understanding what is needed to run this add-in: https://github.com/joyfullservice/msaccess-vcs-addin/wiki/Security-Considerations

hecon5 commented 1 year ago

Did this get working for you @Rod-at-DOH? If not, thought I'd pass on some ideas. My environment is rather stringent, and I've had success getting the addon working (and now even with the ribbon!) by a combination of persistence and begging IT for some fixes.

Note all of these require Access to be completely closed (and no hidden processes running...sometimes I've found Access doesn't actually fully close out on my machine).

  1. Try out the various Advanced options; they're almost all there because I begged (bugged) @joyfullservice to incorporate them.
  2. We've had some success by navigating directly to the Addin location (for whatever reason, sometimes the open after install to trust routine doesn't always work), and opening it directly.
  3. After installing the addin the regular way, if it still doesn't work by selecting "Open add-in after installing to trust the add-in file" and directly opening it, we've also had success by manually adding the add-in as a reference. To do this, you open the VBAIDE, go to Tools>References... then "Browse..." and navigate where the addin was placed (if you didn't change the install location that's likely "C:\Users[Your User ID]\AppData\Roaming\MSAccessVCS"). Then select "All Files (.)" from the file type selector. Inside the MSAccessVCS folder, select the "Version Control.accda" file as the reference, "OK" and then try running the Addin from the "Database Tools" tab> VCS Open
  4. We finally had to beg our IT admins for a special folder for Access files to run, because Access won't (currently) let you sign the VBA environment (supposedly that's going to change soon?). They gave us a "secret" folder and allow access to run in that folder, which also allowed us to run the ribbon, too.
joyfullservice commented 1 year ago

To touch on the original question of whether this tool will work for Access 2007, the add-in itself requires a minimum of Access 2010 in the host application. (Due to certain object model items that were added in this version, and VBA version 7, which includes much better support for 32/64-bit declarations)

In a situation like yours, I would recommend making a copy of the production database into a development folder, then open it in a supported version of Access (v2010+) and use this add-in to export to source files. This will give you a baseline version to start from. Usually a properly split front-end/back-end database can have multiple versions of front ends that work against the same back end.

How difficult it will be to get the database fully functional on a newer version of Access can vary widely. Microsoft typically has great backwards compatibility in Office products, so I have seen databases from multiple versions back work in newer versions with minimal changes required. Other systems might depend on legacy functionality that works differently in newer versions, and that might involve a bit more work. (Such as going from an ADP project to an ACCDB.)

From a development/maintenance standpoint, I highly recommend getting it to the point where you can use Version Control to manage/track changes. It makes it SO much easier when you can actually compare folders of source files instead of staring into a black box trying to figure out what changed!

All the best on the project!

Rod-at-DOH commented 1 year ago

In this case the production database is a SQL Server database. The MS Access 2007 instance is an Access app someone years ago wrote as a front-end to the SQL Server database. (I think. It might have started as an Access 2007 database and app, then someone migrated the database/data to SQL Server. I don't know, as that happened all years before I showed up.)

Or, do your comments apply to just the Access frontend as well?

joyfullservice commented 1 year ago

Or, do your comments apply to just the Access frontend as well?

Yes! That actually sounds like a helpful setup. You should be able to bring a copy of the front end into version control and test upgrading it to a newer version of Access without affecting the production front end, or the design of the back end.

You might also be interested in a recent feature I added within the last couple months that lets you additionally pull a version-control ready set of source files from the back end database objects (tables, views, stored procedures, etc...) directly from your SQL server. It is very easy to add the connection to the SQL server, and gives you some great visibility into the back-end design changes over time. See #415 for more details on this feature.