Removing Leading Zeros For TrialDirector Using MS Access.

Microsoft-Access-2007-LogoPrerequisites; Following these instruction requires an old(er) version of MS Access.  I’m using Access 2007, this or an earlier version will work (not to be older than Access 95).  PLEASE backup the database you want/need to edit, you know just in case. (click on the images to see a larger version).

If you want to try the example please download this sample database


Find the database you want/need to edit.  mdb for editingThe .mdb file we want is usually the largest of the .mdb files in you TD case folder (this is not the case in my example pics) the file name will be “your TD case name.MDB”.



database enhancementOpen the .mdb file.  In Access 2007 the image to the left is the first option you will see, you MUST click no, otherwise TD will not be able to read the DB.

The message looks different depending on the Access version, just make sure you choose “NO” or “Open Database”.


With the DB open, double click the UniObj table.sort Objid

There are a few columns we are interested in; ObjId, ExNo and TrExNo.  The ObjId is the same as what you would see as the document id in Trial Director, ExNo is of course Exhibit Number and TrExNo Trail Exhibit Number.

In this example, I right clicked on the ObjId header and selected the “Sort A to Z” option. This sorts the information so that my exhibit numbers are in order.

Copy the contents of the ObjId column using either “ctrl c” or right click option.

Paste this information in either the ExNo or TxExNo column.  For all intents and purposes the columns are interchangeable. They allow us to use a name different from the “Document ID” to bring up a document or page.

 Exhibit Numbers

Paste to exnoI have chosen to use the ExNo column.








replace txt

Make sure the ExNo column is selected “ctrl f” brings up the “Find and Replace” function, click on the “Replace” tab.






replace txt 2Depending on the changes needed you should only need to make adjustments in the “Find What”, “Replace With” and “Match” fields.

In my example i am starting at the start of the Exhibit Number; removing the “00”.

“Find What” (part to remove)

“Replace With” (replace or add)

“Match” (three options, Any Part of Field, Whole Field and Start of Field)

Find What = 00

Replace What = blank

Match = Start of Field

Searching in the ExNo field (“Look In” pull down), finding 00 at the start of the field.


replace txt 3The documents in this Database have been padded with 00 we need to run another replace.

Find What = 0

Replace What = blank

Match = Start of Field




 Page Numbers

replace txt 4The process is basically the same as with the exhibit numbers with just a few tweaks.

Find What = -00

Replace What = –

Match = Any Part of Field

Like the exhibit numbers the pages have been padded with 00 we will need to run another replace.


Find What = -0

Replace What = –

Match = Any Part of Field


replace txt 5You can now see that the exhibit number column is populated with NO leading zeros.







That’s it. Close Access and open the case in TrialDirector.   This is a very basic example, depending on the complexity of the TD Database this procedure would have to be altered.  Find yourself an old case, make a copy of the Database and play, try using the selection filters to limit the selection in complex databases. Click here to have a look at our other Document tips.