
Originally Posted by
TG_W
Have you tried the "DoCmd.OutputTo" method?
Example with relevance to your needs (would need editing before your use) - DoCmd.OutputTo acOutputTable (or acOutputQuery), "Your Table or Query Name Here", acFormatTXT, "export.c"
Hi, Thanks for your reply. "DoCmd.OutputTo" would output the entire table structure and data to the text file, which is not what I want.
I want the following code to be in my output text file (.C file)
Code:
main()
int i=2;
int j=4;
int Info[2][4]={ (1,aaa,ccc,xyz) , (2,bbb,ddd,xyz) }
and this value of i,j are provided by the VBA using & rs.Fields.Count and & rs.RecordCount as shown in my first post and the int Info[2][4]={ (1,aaa,ccc,xyz) , (2,bbb,ddd,xyz) } should be provided by VBA by reading all records in table and then mapping to Info[i][j] but not directly hardcoding it