View Full Version : open Visual Fox PRo object


mmoscowitz
07-14-2003, 05:36 AM
I am trying to automate importing information from Visual FoxPro into Microsoft Access. I really just want to import data into a text file from VFP and then import it into Access but I want to do all the commands from an Access Module. Here is the code I came up with so far and all that is happening is the code executes and either just runs and runs or nothing happens.

Dim fox As Object
Set fox = CreateObject("VisualFoxPro.Application")
fox.DoCmd ("set path to i:\ipc\vdata")
fox.DoCmd ("DO production_query.qpx")
fox.docmd ("COPY TO c:\documents and settings\mmoscowitz\my documents\2nd run.txt" DELIMITED WITH "'" WITH CHAR TAB")

If anyone can help, I'd appreciate it

mmoscowitz

FoFa
07-14-2003, 07:35 AM
Can't you just link the VFP tables and read them directly from Access?

mmoscowitz
07-14-2003, 07:49 AM
That would be the easy thing to do but I need to work with the data in a text file before appending the data. That part is all done automatically from commands in Access. That's why I need help with the commands from VFP in Access. I'm really hoping this way will work