1
votes

I've been saddled with supporting an old Access 2003 database (with SQL backend) produced by a now out-of-business contractor.

The database includes several 'unconventional' reports. They all use Automation through VBA to output fields directly to a Word document. Kind of like this (pseudo code):

for each row{
      output(row.id);
      moveRight();
      output(row.firstName);
      newLine();
}

Etc.

The problem is, the database includes several rich text fields. To output these (including their formatting) to the document, the developer opens a separate Access form, with a single rich text control, and pulls the appropriate field into the text box.

He then does a 'select all, copy', flicks back to Word, and then pastes the text.

My task is to add a new rich text field to a report, and I feel there must be a better way of doing this...

1
It would be easier if he'd created a generic way of accessing the functionality. As it stands each report uses a slightly modified copy/ paste of the code. I'm struggling to be nice about this contractor's (Daily WTF-worthy) code.ChristianLinnell

1 Answers