![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jan 2005
Posts: 3
Rep Power: 0
![]() |
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. |
|
|
|
|
|
#2 |
|
Programming Guru
![]() |
maybe make it so that text0 is not in quotes as it is a variable?
so it might be DDEpoke intChan1, text0, "Hello" |
|
|
|
|
|
#3 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
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.
|
|
|
|
|
|
#4 |
|
Expert Programmer
|
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...
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|