TntConnect TM
Helping you build powerful connections for a lifetime of ministry...

How can I develop add-ons for TntConnect?

TNT.tips from Bob!

Table of Contents

It is our pleasure to provide this software free of charge to help you in your ministry.  We're so thankful for our partners who make this possible!

About TntWare

Page Details

First published by:
Troy Wolbrink
on 29 Sep 2008
Last revision by:
Troy Wolbrink
on 24 Jun 2017
4 people found this article useful.

100% of people found this useful
How can I develop add-ons for TntConnect?

Access Database Add-On

If TntConnect doesn't do exactly what you want, and you know how to use Access 2000, you can develop custom Access solutions to enhance TntConnect.  TntConnect has a special feature called "Link to Access Database".  This takes an existing database and adds read-only links to tables within TntConnect.  This way you can add your own tables, queries, forms and reports and VBA (Visual Basic for Applications) code modules.   For a better explanation follow this link: http://msdn2.microsoft.com/en-us/library/aa141493(office.10).aspx   Keep in mind in this illustration that the "Back End" database is the TntConnect file (*.mpddb) and the "Front End" database is the Access 2000 database (*.mdb) that you told TntConnect to link.

Windows Application Add-On

More advanced developers will appreciate the fact that TntConnect provides programmatic ways to create and update linked Access databases via the command line.  For help on this feature, run "TntConnect.exe /?" from the command line.  The location of TntConnect.exe can be found in the registry at "HKEY_LOCAL_MACHINE\SOFTWARE\TntWare\TntConnect\InstallPath".  Each add-on can create and maintain its own link to the database without requiring the user to manually establish the link.

TntConnect's Database Structure

As to the layout of the underlying tables. You will find that most tables use the first field as their primary key. For example, the main table is called "Contact". The primary key is "ContactID". The gift table has a field called "ContactID" that links back to the person who gave the gift.

Changing Data in TntConnect?

The linked database is to a read-only copy.  If your add-on is going to change data in TntConnect, you'll have to make changes directly in the TntConnect database.  A TntConnect 3.1 or newer database is an Access 2000 database (subject to change).  If you do make changes to data in the TntConnect database, it may be required to perform the File|Maintenance task when you are done. Open TntConnect. Click on the "File" menu ... select "Maintenance". From the maintenance screen, recalculate mailing, money and history data.  These steps are recommended for the program to operate correctly.  Also, each table has a "LastEdit" field that needs to be updated for TntSync to work correctly.

Adding your Add-On to the "Tools" menu in TntConnect

Look in the Windows registry (using regedit.exe) at the key:  "HKEY_LOCAL_MACHINE\SOFTWARE\TntWare\TntConnect\ExternalTools\"
(or if you're on 64-bit Windows look at: "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\TntWare\TntConnect\ExternalTools\")
TntSync is provided as an example of how you can register your add-on under the "Tools" menu. 

Each tool can specify certain values:  Category (if you want a sub-menu), Target (what get's executed when you click the menu ... can be anything that runs under the Windows "Start" menu ... "Run"), IconTarget (where you want the menu extracted from for the tool's menu item), and Shortcut (if you want a keyboard hotkey such as "Ctrl+F1" for running your add-on),  Parameters for additional command line parameters sent to your application.

In the Parameters, you can include "currentgroup.csv" somewhere, and it will be replaced with the name of an actual file which represents an export of the current filtered list of contacts in TntConnect's contacts view.  This allows your add-on to do something with the current group.

Mail Merge Handler

TntConnect includes built-in support for merging with Microsoft Word 2000 and newer.  You can replace this with your own Mail Merge functionality.  For some documentation on how to integrate your add-on with TntConnect, look in TntConnect's installation folder under "\Developer Notes\External Handlers.zip".

App Exit Handler

If you want your add-on program to get called when TntConnect exits, look for the example in TntConnect's installation folder under "\Developer Notes\External Handlers.zip"

Examples

There are some add-ons currently available for TntConnect.

 

Recent Comments

By: guitarmanvt Posted on 16 Feb 2009 3:25 PM

I'm attempting to insert new records into the database.  The ID fields are all full of some long ID number.  Can you provide a reference to where this ID number comes from and if it's safe to just insert a unique number into this field?

By: Troy Wolbrink Posted on 18 Feb 2009 10:53 PM
100% of people found this useful

It can be anything as long as it's unique.  I believe Access has a Rnd() function that could be utilized.

By: Paul Federwitz Posted on 14 Mar 2011 9:45 PM
100% of people found this useful

The documentation for adding an add-on to the Tools menu should clarify that the "currentgroup.csv" tag should be added to a Parameters key instead of included in with Target.  Including it with Target will give you an error about specified file not found.  

By: Troy Wolbrink Posted on 12 Apr 2011 6:29 PM

Thanks, Paul.

By: Danny DeLoach Posted on 20 Feb 2017 1:56 PM

I am using TntConnect  3.1 r14.  When I create a linked Access database, the links point to a database in the directory: "C:\Users\danny\AppData\Local\Temp\TntConnectTemp\".  The temporary database in this directory does not update, when data in my TntConnect database is updated.  When I use the Linked Table Manager in MS Access to point the links to my actual TntConnect database (i.e. my .mpddb file), I receive the error, "Not a valid password".

I tried entering the password that I used in TntConnect back when it used to encrypt the database, but that didn't work.  To troubleshoot further, I created a new database in TntConnect (i.e. from File | New... in TntConnect).  When I try to link to this new database, I receive the same, "Not a valid password" error.

How do I resolve these issues, so that I can create functional links to my TntConnect database?  Thanks.

By: Troy Wolbrink Posted on 20 Apr 2017 11:24 PM

Hi Danny,  TntConnect creates a read-only snapshot for your linked database to refer to.  If you want to change data in TntConnect, you can run action queries from that database within TntConnect, but you can't refer to tables in your linked database.

If you want to use the Linked Table Manager in Access, the password for a TntConnect database is "tntMPD".

--Troy

© 2024 TntWare, Inc. | Privacy | Terms of Use