Home » Documentation » Interfaces » Dynamic Data Exchange (DDE) & Simple Accounting

Documentation

Dynamic Data Exchange (DDE) & Simple Accounting

Dynamic Data Exchange (DDE) & Simple Accounting

You can automatically link and use information from Simple Accounting with other Windows applications through an extremely powerful Windows feature called Dynamic Data Exchange (DDE). DDE allows programs to ‘talk’ with one another. This allows you to do a number of things depending upon the applications which are conversing, however in Simple Accounting it means that another application can use information from a Simple Accounting data file and that, as the contents of that data is changed, the information in that application will also change automatically.

 

Servers & Clients

A DDE conversation occurs between two computers: A server and a client. The server acts as the source of the data for the client. The client receives the data and automatically changes the information in the client document as the data in the server changes.

A common example would be a form letter set up in Microsoft Word® including DDE fields for the name and address of a contact entered in Simple Accounting. You load Simple Accounting, open the contacts browse and then open your Word document. When you look at your Word document, you see that the DDE fields in the document contain the name and address of the currently selected contact from the Simple Accounting contacts browse. As you change the selected record in the contacts browse, the name and address change in your Word document automatically.

 

Applications

DDE is a tremendously powerful tool. It can automate mundane tasks, making tedious jobs almost enjoyable. It can also allow you to do certain things that would, previously, have been far too tedious to accomplish. Here are just a few suggestions of what can be easily done using DDE. Remember these are just the tip of the iceberg and you are limited only by your ingenuity!

 

Word Processing 

You can set up a letter in your word processor with DDE fields. These fields refer to data from the Contacts browse in Simple Accounting. The fields in the document are automatically updated to the record you have selected in the Contacts browse.

Set up as many types of letters as you need to perform various marketing functions. These can also be set up for customers to provide dunning notices or customized reorder notices for products.

 

Spreadsheet   

You can set up a spreadsheet with DDE fields in various cells representing a particular sales person’s monthly or yearly sales. As you change records in the Sales Reps browse, the spreadsheet is automatically updated with the new sales person calculations.

 

Presentations   

You can set up a chart with DDE fields in segments representing a particular customer’s monthly forms usage. As you change records in the Products browse, the chart is automatically updated with the new usage totals.

 

How To Do It

A field in a DDE client must have the following pieces of information in order to receive a piece of data from Simple Accounting:

 

Server Name 

 

The name of the application supplying the data. In Simple Accounting this is always the word SIMPLE.

 

Data File Name  

The name of the data file to draw data from.

 

Data Field Name  

The name of the field in the Data File you wish to insert into your document.

 

 

<dawn>For example, in MS-Word®, this is the way you would insert a DDE field to include a phone number from the selected record in the Contacts browse.</dawn>

  {DDEAUTO SIMPLE CONTACTS CONTACTS:PhoneNumber}

 

Where ‘SIMPLE’ is the name of the DDE Server, ‘CONTACTS’ is the name of the data file, and ‘CONTACTS:PhoneNumber’ is the name of the field in the contacts data file.

Examples are included in the Simple Accounting Setup program which work with Microsoft Word® and Excel® . However, though the procedure is the same for all applications, the exact syntax is different for each. In other words, in Microsoft Word to create a DDE link to the contacts browse, you would insert a DDEAUTO field, but if you wish to user WordPerfect or Lotus WordPro the commands would be a bit different. Please consult the documentation of your client application for details.

 

FIELD AND FILE NAMES

The preceding example begs the following question, ‘How do I determine the names of the files and fields to use in my DDE documents?’ These are included in File & Field Names topic. Use this, and the example DDE documents as your guides.

 You can get a list of field names for many files from their browse by selecting the [Print] button and selecting the [Export] menu. The Source Fields window will list all fields in the data file. For example, go to the Contacts Browse, press [Print], then Export to view all fields in the contacts data file.

When you first examine the DDE Sample documents you will notice that some of the DDE fields include not only field names but some fairly complicated gibberish that looks like spreadsheet formulas. In fact, these are some extremely handy little functions and expressions that we have included for you to use in your DDE fields. These are documented in the File & Field Names topic.

 

IMPORTANT POINTS TO REMEMBER

1. There are two methods of data updates which a DDE server may make to a DDE client: Automatic and Manual. An automatic link is updated whenever data from the server changes. For example, if you change the selected record in the contacts browse, the name and address you have entered in your Word document will change accordingly. Simple Accounting makes itself available for automatic updates by default. A Manual link, conversely, will only update when you tell your client application to update it’s DDE links. Again, in Word, you would press the [Update Links] button to do this.

 

2. Your DDE client documents will assume that the DDE server (in our case, SimpleAccounting) is already running. In other words, you should open Simple Accounting and open the browse you wish to link to before opening your client application.

Example: You have a form letter which draws data from your contacts browse; if you open your Word document before Simple Accounting or without having the contacts browse open, Word will give you a series of error messages and you will have to then open the contacts browse and then press the [Update Links] button in order to use the document.

 

3. Points for Good Spelling! If you misspell the name of a field link in your client document, and your links are set up to automatically update, it is very likely that your client application will stop responding. This is because your client document will be attempting to receive data from the DDE server which does not exist over and over. This won’t cause any data loss or damage, but it is quite annoying.

 

Last Revision: 11.6.2013
x

Contact

How Can We Help?

Other Ways To Reach Us

Sending your message. Please wait...

Thanks for sending your message! We'll get back to you shortly.

There was a problem sending your message. Please try again.

Please complete all the fields in the form before sending.

x

Add this topic to your list of favorites?