Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 19th, 2005, 7:53 AM   #1
John07
Newbie
 
Join Date: Jan 2005
Posts: 3
Rep Power: 0 John07 is on a distinguished road
Angry Help Me!

Im going friggin crazy.

Alright I was testing a DDE connection with 2 excel spreadsheets, works fine.
Now i need to write to a textbox in an access form. heres what I have:



Sub Main()
intChan1 = DDEInitiate("MSAccess", "db1") 'This connects OK

DDEExecute intChan1, "[OpenForm FORM1,0,,,1,0]" 'Opens Up my form

DDEpoke intChan1, "text0", "Hello" 'Text0 is the text box, this line wont work

End Sub

Anyone who can help me, It would be really appreciated.
John07 is offline   Reply With Quote
Old Jan 19th, 2005, 10:58 AM   #2
Berto
Programming Guru
 
Join Date: Aug 2004
Posts: 1,022
Rep Power: 6 Berto is on a distinguished road
Send a message via AIM to Berto Send a message via MSN to Berto
maybe make it so that text0 is not in quotes as it is a variable?
so it might be

DDEpoke intChan1, text0, "Hello"
Berto is offline   Reply With Quote
Old Jan 19th, 2005, 1:34 PM   #3
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
No, he's right - he's talking to an object in another application, so it needs to be in quotes. Unfortunately, I have no idea what the problem is - I've never used DDE before.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Jan 21st, 2005, 11:28 AM   #4
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
You might need to reference it as "myform.text0". Or maybe I'm talking rubbish - I'm not sure if DDE actually exposes the values of programs (forms) you've written for the application - however you may be able to achieve the same effect by sending the textbox's handle via DDE and then running the GetWindowText API...
Rory is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:01 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC