exporting info from database tables to a C++ program

shandoo27

Registered User.
Local time
Today, 11:14
Joined
May 20, 2010
Messages
30
Hi,

I would like to run a C++ program which is called using a macro when a command button is clicked in the form . But the C++ program requires data which is available in the link tables in MS access . Is there anyway i can extract these data seperately and give it as input to my C++ program.

Thanks in advance for your help.
 
docmd.transfertext will produce a csv file, that your c program could use

or

you could link directly to the dbs tables in your c programme.
 
Thanks for the help . Can I use transfertext on to transfer data from tables to text files or Can data also be directly trasnferred from text boxes ?
 
transfertext will transfer data from a table or query, to a text file

you could manually code a button to do anything though, by opening a file, and explicitly writing to that file.
 
Yeah thats what i wanted . How do you open a file and write into it using VBA coding . Please enlighten me on this . If you could give a sample code I would be very thankful .

Thanks in advance for the help .
 
something like these statements



dim chan as long

chan=freefile

open "myfile" for output as chan (maybe needs #chan)

write #chan, "some text"

close chan (maybe close #chan)
 

Users who are viewing this thread

Back
Top Bottom