Hey Guys,
any and all help here will be VERY MUCH appreciated.
two issues, one I have figured out, it’s just trying to get what I have figured out ‘plugged’ into what I have not.
SCENARIO:
once a month a user will need to open an Access Database and import a table (actually several tables from different Databases) into the one they are working off of.
that part I have figured out and here is the code I have which miraculously seems to work.
DoCmd.TransferDatabase acImport, "Microsoft Access", "c:\Import\VFATEST.mdb", acTable, "SCM_Data", "Data1", False
As you can see from this, it is accessing the database VFATEST.mdb in c:/import, the SCM_Data table, and naming it “Data1” once it pulls it in.
Works like a charm but now comes the part that has me banging my head against the wall; ‘file picker’ in VBA.
When they click a button the transfer described above works fine but this is what I need to be able to do.
They click a button and it opens a file picker dialog box where they browse to a folder, select the Access Database they want to pull the table from and select the table.
See where I have “Data1” as the table name once it is imported?
That’s where it really gets fun.
Some of these databases have the same Table name that needs to be imported so they need to be able to name the table once it’s imported like “01_SCM_data, 02_SCM_Data, etc.
I have spent the better part of the day driving myself crazy just trying to get the file picker dialog box and I have dug through (actually copy and paste the code) and at least got it to filter to .mdb or .accdb but no clue how to then go next level down to select table!
Again, any and all help very much appreciated