View Full Version : Using DDE in Peachtree
badge0913
05-31-2002, 07:51 AM
I was able to use the DDE to read inventory items from Peachtree. My problem is how can I get a list of all the parts/items that make up an assembly. I only can get the first, next and last item numbers. That's fine for assemblies with 3 parts or less, what about an assembly with 50 parts?
dringstrom
05-31-2002, 08:19 AM
Post your code, or e-mail it to me, and I'll take a look. Alternatively. you may want to consider PawCOM in lieu of DDE (www.accountingadvisors.com/pawcom).
badge0913
05-31-2002, 09:39 AM
Thanks for replying DRINGSTROM I just figured out how to do it about 5 minutes ago. I don't have all the code in place but I figured out the problem that kept me from moving forward. I'll put the answer here anyway just in case someone else needs to get the list of parts for an assembly.
Visual Basic example:
'First we need to connect to the company the assembly
'exists in
TextBoxLink.LinkMode = 0
TextBoxLink.LinkTopic = "peachw" & "|" & "bcs"
TextBoxLink.LinkMode = 2
'once we're at the correct assembly record we'll get the
'first item in assembly
TextBoxLink.LinkItem = "file=lineitem,field=firstpart"
TextBoxLink.LinkRequest
Grid1.Text = TextBoxLink
'now we'll get the next part of assembly
TextBoxLink.LinkItem "file=lineitem,field=nextpart"
TextBoxLink.LinkRequest
Grid1.Text = TextBoxLink
'this part is where I was having the mental block, then
'the light bulb turned on. Now we need to get each additional
'part until we get to the last part of the assembly. This code
'would be in a while loop until nextpart=lastpart
TextBoxLink.LinkItem = "file=lineitem,field=nextpart,next"
TextBoxLink.LinkRequest
Grid1.Text = TextBoxLink
'if you need to get the last part
TextBoxLink.LinkItem = "file=lineitem,field=lastpart"
TextBoxLink.LinkRequest
Grid1.Text = TextBoxLink
'this skips to the next item record
TextBoxLink.LinkItem = "file=lineitem,next"
TextBoxLink.LinkRequest
I just modified the code example that Peachtree delivers with their software. This example is named VB5_DDE in the \PEACHW directory. This is a good Visual Basic example of how to get started using DDE with Peachtree.
dringstrom
05-31-2002, 10:24 AM
I figured that was where your problem was. That's why I wanted to see your code. If it helps, I have the one of the only sources of DDE tips on the Internet at www.accountingadvisors.com/dde.
Good luck with your project!
HappyCamper436
06-03-2002, 12:40 PM
David
I tried to go to the link, www.accountingadvisors.com/dde, you posted for DDE help and received an error message that the web page did not exist.
Thanks
John
dringstrom
06-03-2002, 01:37 PM
John,
A comma got appended to the end of the address in my previous post. Try this link
www.accountingadvisors.com/dde
Thanks for notifying me!
David
SBTBILL
06-05-2002, 01:49 AM
Just thought I'd mention you can use DDE with VFP.
There I can use code like this to get the assembly items from the export.
for x=1 to 100
store 'qty'+alltrim(str(x)) to mqty
store 'id'+alltrim(str(x) to mid
? &mid,&mqty
endfor
Bill Couture
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.