PDA

View Full Version : vba used to retrieve data within a csv file to auto-populate in a table in ms access



wedd
11-17-2010, 11:26 AM
Hi, do you know of any vba I can use that once I click on a button (vba coded) can retrieve data from a csv file and autopopulate in a table :friends: I was wondering if it was possible to create a complex button using the file \\Cluster2\Dept (file://\\Cluster2\Dept) Data\Migration Data\NOMSALES.csv as a source and from that create a csv file that displayed sample data from the file \\Cluster2\Dept (file://\\Cluster2\Dept) Data\Migration Data\NOMSALES Output.csv. In other words instead of the user going through a directory to open a file I would like the user to click on a button within an access form and the data within the later file will automatically populate in a table. Can this be done? If so what vba code can be written for this to be done? :help


Thanks for your solutions :bow:


Failure is when you decide you cannot do anymore and give up

OBP
11-18-2010, 04:24 AM
Yes you can input data straight in to a table using the DoCmd.TransferText or open the file and read the data a character or line ata a time.

wedd
11-18-2010, 05:19 AM
Thanks!