Charlotte Foust
cfoust at infostatsystems.com
Tue Jun 23 10:10:07 CDT 2009
John, Didn't you ever use DDE in the early versions of Access/Office? This is old clunky stuff and you don't want to go there. To use it, you had to do a bunch of stuff that COM handled automatically and soooooo much better. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, June 23, 2009 7:15 AM To: Access Developers discussion and problem solving Subject: [AccessD] What is this? I just found code that does the TransferText in a completely different way. I have never seen a text control use these properties and methods. Is this something new in 2007 or does this go back to some previous version? What is the advantage of this over the normal TransferText? http://support.microsoft.com/kb/113905 Sub Command1_Click () Dim cmd As String ' Holds DDEExecute command. On Error GoTo DDEerr ' Error trap. ' Make sure there isn't an existing DDE conversation: text1.LinkMode = 0 ' Set up the DDE link: text1.LinkTopic = "MSACCESS|C:\ACCESS\NWIND.MDB" text1.LinkItem = "All" text1.LinkMode = 2 ' DDEExecute command to import text file into Microsoft Access Table: cmd = "[TransferText ,,'Shippers','C:\ACCESS\SHIPPERS.TXT']" ' Execute the TransferText command and close the DDE link: text1.LinkExecute cmd text1.LinkMode = 0 MsgBox "Transfer OK" Exit Sub DDEerr: ' An error has occurred. MsgBox Error MsgBox "Error in transfer." Exit Sub End Sub -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com