Category Archive: DDE

Mar 26

Extracting Inventory Items

If you're extracting Inventory items, in the line item file the field REORDERQTY corresponds with the Minimum Stock field, while ORDERQTY corresponds to Reorder Quantity. Yes, this is does appear to be backwards, but much of how DDE is implemented in Peachtree calls for reverse logic.

Mar 26

Improved Password Security

As you're probably aware, the password security in Peachtree Complete Accounting 6.0 and later is greatly improved over previous versions. You can now limit access on a screen-by-screen basis. Even better, you can set up a user ID that ONLY allows DDE access. Thus, you can also set the password to DDE. Storing DDEDDE in your app means that if someone happens to trip through your code, they'll only gain access to a password that won't let them do anything at all within Peachtree.

Mar 26

Password Protection Reminder

Also keep in mind that if the Peachtree company that you're accessing is password protected, in Peachtree 6.0 and later you have to send the user id and password together, i.e. JoeUserJoePassword.

Mar 26

Transaction Data from other Periods

Want to pull transaction data from other than the current period? Use the following syntax:
“File=journalname,KEY=PER=period#,Field=fieldname”

Mar 26

Extracting Inventory Items

If you're extracting inventory items, in the line item file the field REORDERQTY corresponds with the Minimum Stock field, while ORDERQTY corresponds to Reorder Quantity. Yes, this is does appear to be backwards, but much of how DDE is implemented in Peachtree calls for reverse logic.

Mar 26

Inventory Items and DDE

There's even more fun if you're working with inventory items via DDE. You can only extract the quantity on hand from Peachtree via DDE (that field isn't available for text import). Fair enough, but you can't export the current item cost for a stock item via DDE. That gem can only be extracted from Peachtree via text file. So, if you need both the Quantity on Hand AND the Item cost, you get to create a solution that involves both DDE and exporting via text file. It's just a blast!
Update: Version 8.02 and later of Peachtree allow you to export the Quantity on hand to a text file.

Mar 26

Keep It Simple!

When it works, using DDE with Peachtree is fantastic. However, building a successful DDE solution requires a lot of trial and error. Good code samples are few and far between, particularly in the Peachtree documentation. The best advice that we can offer is when you're starting out, keep things simple! If you're trying to poke data into Peachtree, send over only the minimum information required to create a transaction. Only after you can get the basics to work should you then try to add complexities such as multiple distributions and additional fields.

Mar 26

Best Place to Start

If you're new to using DDE with Peachtree Accounting, it's best to start out by using DDERequest to extract information from Peachtree. It's hugely easier to get information out of the program, but you can, with some perseverence, successfully get data into the program.

Mar 26

Troubleshooting DDE

DDE is implemented similar to the Import/Export function in Peachtree. Thus, if you're having a problem poking information into Peachtree, try exporting some transactions out of Peachtree, then take a look at the resulting .CSV file. For instance, to poke Sales Tax into a Invoice transaction, the sales tax calculation must be the first line of the distribution. If it isn't, you simply won't be able to poke sales tax into Peachtree.

Mar 26

Sales Tax Authority Must be Manually Edited

You can't poke the Sales Tax Authority into Peachtree. Thus, even if you poke the sales tax amount, you'll still have to manually edit the invoice in Peachtree to add the Sales Tax Authority. Without the Tax Authority, you can't print the invoice. Hopefully, this will be corrected in a future update to Peachtree.

Mar 26

Launching Peachtree

Use the Shell command to launch Peachtree. However, you must preface this statement with the ChDir (“C:PEACHW”) command. To retain the current directory settings, use CurDir to return the current directory, then pass the result to a second ChDir command. Otherwise, C:PEACHW will become the default directory for Excel, and users may inadvertantly save spreadsheet files there. Sample code:
x=CurDir
ChDir (“C:PEACHW”)
q = Shell(“C:PEACHWPEACHW.EXE”, vbMinimizedNoFocus)
ChDir (x)

Mar 26

Launching and Poking

To poke data, you must either open the desired company, or have no company open at all. To launch Peachtree without opening a company, use PEACHW BLANK where as long as the short ID for a company isn't called BLANK, the Peachtree will load without any active company, enabling you to poke data into any company. Sample code:
q = Shell(“C:PEACHWPEACHW.EXE BLANK”, vbMinimizedNoFocus)

Mar 26

Determining the Short ID for a Company

To determine the short ID for a Peachtree company (which is how you reference the company via DDE), launch Peachtree, then choose Help | File Statistics. The short ID will be displayed on the title bar of the dialog box that appears. FYI, this ID is the same as the directory name where the company's data files are stored.

Mar 26

More DDE Info

For more information about using DDE, download Peachtree Software's DDE Manual. Keep in mind though that this manual is best looked to as a list of field names. There is very little actual code in this manual. You should, however, also refer to the software manual that comes in the box with Peachtree. It includes a somewhat helpful chapter on DDE. This Word document is contained in a 79KB self-extracting archive.

Mar 26

Clear and Save

With regard to poking transactions, you must use the CLEAR command to indicate that you're starting a new transaction, and the SAVE command to indicate the last line of a distribution. Without the SAVE command, Peachtree won't record the transaction.

Older posts «