A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

DDE function works in A2003 but not in A2007



 
 
Thread Tools Display Modes
  #1  
Old November 2nd, 2009, 09:37 AM posted to microsoft.public.access.forms
Greg Alessandra
external usenet poster
 
Posts: 1
Default DDE function works in A2003 but not in A2007

I am having trouble converting a database that uses the DDE function from
A2003 to A2007. After much frustration, I eliminated as many variables as I
could by creating a new database with no tables and just one form. The form
has only one text box control. The controlsource is
=DDE("WINROS","LAST","KSU")
In A2003, this returns 24.23 which is the LAST price for the stock symbol
KSU from Esignal's quote application WINROS.EXE which is running on my
machine. In A2007, all I get is #Name?. If I switch back and forth between
A2003 and A2007, leaving everything else alone, A2003 responds as expected
with a price from the winros app, but A2007 only returns #Name?.
To test further, I opened an Excel spreadsheet and put the number 12345 in
R1C1. I changed the controlsource of the text box in my access form to
=DDE("excel". "sheet1", "r1c1"). In A2003 the control shows "12345" but not
in A2007. All A2007 says is #Name?
The online help suggests that the DDE function is still available in A2007.
I have added the directory where this database resides to the Trusted
Locations area. I am really at wits end on this one. Any ideas would be
tremendously helpful. Could the source of my problem be a security setting,
an inherent flaw with the free trial version of A2007, or a missing
reference? Thanks in advance for any ideas.




  #2  
Old November 2nd, 2009, 02:53 PM posted to microsoft.public.access.forms
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default DDE function works in A2003 but not in A2007

On Mon, 2 Nov 2009 00:37:01 -0800, Greg Alessandra Greg
wrote:

I suspect you forgot to copy your custom DDE function from the
previous app to this one. I wrote this code in A2007 and it works with
your Excel example:
Public Function myDDE()
Dim h As Long
h = DDEInitiate("excel", "Sheet1")
Debug.Assert h
Dim s As String
s = DDERequest(h, "r1c1")
DDETerminate h
myDDE = s
End Function
Then set the ControlSource to:
=myDDE()

-Tom.
Microsoft Access MVP



I am having trouble converting a database that uses the DDE function from
A2003 to A2007. After much frustration, I eliminated as many variables as I
could by creating a new database with no tables and just one form. The form
has only one text box control. The controlsource is
=DDE("WINROS","LAST","KSU")
In A2003, this returns 24.23 which is the LAST price for the stock symbol
KSU from Esignal's quote application WINROS.EXE which is running on my
machine. In A2007, all I get is #Name?. If I switch back and forth between
A2003 and A2007, leaving everything else alone, A2003 responds as expected
with a price from the winros app, but A2007 only returns #Name?.
To test further, I opened an Excel spreadsheet and put the number 12345 in
R1C1. I changed the controlsource of the text box in my access form to
=DDE("excel". "sheet1", "r1c1"). In A2003 the control shows "12345" but not
in A2007. All A2007 says is #Name?
The online help suggests that the DDE function is still available in A2007.
I have added the directory where this database resides to the Trusted
Locations area. I am really at wits end on this one. Any ideas would be
tremendously helpful. Could the source of my problem be a security setting,
an inherent flaw with the free trial version of A2007, or a missing
reference? Thanks in advance for any ideas.



  #3  
Old November 3rd, 2009, 05:52 AM posted to microsoft.public.access.forms
Greg Alessandra[_2_]
external usenet poster
 
Posts: 1
Default DDE function works in A2003 but not in A2007

I used your approach and it solved the problem. Thank you very much.
I still have the impression that the function DDE doesn't work as advertised
in A2007. http://office.microsoft.com/en-us/ac...288191033.aspx
In any case, you have been very helpful. Thank you.

"Tom van Stiphout" wrote:

On Mon, 2 Nov 2009 00:37:01 -0800, Greg Alessandra Greg
wrote:

I suspect you forgot to copy your custom DDE function from the
previous app to this one. I wrote this code in A2007 and it works with
your Excel example:
Public Function myDDE()
Dim h As Long
h = DDEInitiate("excel", "Sheet1")
Debug.Assert h
Dim s As String
s = DDERequest(h, "r1c1")
DDETerminate h
myDDE = s
End Function
Then set the ControlSource to:
=myDDE()

-Tom.
Microsoft Access MVP



I am having trouble converting a database that uses the DDE function from
A2003 to A2007. After much frustration, I eliminated as many variables as I
could by creating a new database with no tables and just one form. The form
has only one text box control. The controlsource is
=DDE("WINROS","LAST","KSU")
In A2003, this returns 24.23 which is the LAST price for the stock symbol
KSU from Esignal's quote application WINROS.EXE which is running on my
machine. In A2007, all I get is #Name?. If I switch back and forth between
A2003 and A2007, leaving everything else alone, A2003 responds as expected
with a price from the winros app, but A2007 only returns #Name?.
To test further, I opened an Excel spreadsheet and put the number 12345 in
R1C1. I changed the controlsource of the text box in my access form to
=DDE("excel". "sheet1", "r1c1"). In A2003 the control shows "12345" but not
in A2007. All A2007 says is #Name?
The online help suggests that the DDE function is still available in A2007.
I have added the directory where this database resides to the Trusted
Locations area. I am really at wits end on this one. Any ideas would be
tremendously helpful. Could the source of my problem be a security setting,
an inherent flaw with the free trial version of A2007, or a missing
reference? Thanks in advance for any ideas.



.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:38 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.