I've seen a lot of posts on tek-tips about how to import files using TransferText or TransferDatabase, etc. But how do I simply open the Import Wizard (File, Get External Data, Import) from Visual Basic code?
Thanks for the help, PHV, that was what I was looking for.
Unfortunately, my boss just made the specs much harder, so now I need some advice from anyone about the best way to approach this problem.
I have code written that will take address information, parse it/clean it up, and output that clean information into a new table. My boss wants a GUI that will let him import any file and have that file automatically cleaned up/parsed and exported to a new file. That would have been fine with the DoCmd.RunCommand acImport
The problem is that these random tables/files he'll want to import will have other fields/columns that I don't need, and he wants those preserved in the final file. In other words, each record will start with the first 7 fields I need for my parsing code, but will have an arbitrary number of other fields for each record, and once each record is cleaned, those other fields need to be included with each relevant record. So I thought acImport would be helpful, and I would just import the first 7 fields I need into my existing table and ignore the rest of the fields. But now that there is an arbitrary number of other fields, I can't use an existing table's framework to store the information.
Any ideas as to how I should approach this, importing the data with the arbitrary number of extra columns and storing those extra columsn with each record as it's parsed (each parsed record is stored to a new table with recordset.addnew
I've decided to import the data and clean it, then using a query to combine the two tables (input data and cleaned data) based on index. The problem is that I need to join inputdata.* and cleandata.* in a query (because I don't know what arbitrary fields will be in the inputdata table), but I want to exclude those fields that have been cleaned into the cleandata table.
So is there a way to write a query of select table.* EXCEPT CERTAIN FIELDS?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.