Solved

File open Prompt Using in VBA

Posted on 2006-06-13
10
334 Views
Last Modified: 2008-02-20

I want to import a spreadsheet into a microsoft access table. I need a typical windows file open prompt to appear so the user can choose the file they wish to import and once selected inport the spreadsheet into a table

Can anyone help me with this?
0
Comment
Question by:oogooglies
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 65

Expert Comment

by:rockiroads
ID: 16895056
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 16895058
pick the 2nd one
0
 
LVL 38

Expert Comment

by:puppydogbuddy
ID: 16895074
Download free demo and source code "Browse and Open Files" at this link:

                  http://www.candace-tripp.com/pages/access_downloads.aspx#8
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 34

Expert Comment

by:jefftwilley
ID: 16895256
I've been assisting another with your same intentl...might be helpful
http://www.experts-exchange.com/Databases/MS_Access/Q_21882261.html#16895169
J
0
 

Author Comment

by:oogooglies
ID: 16897882
rockiroads, thanks that is exactly what i needed. The next step is to use the file selected and import it into a table within the access database... how would i go about doing that?
0
 
LVL 34

Expert Comment

by:jefftwilley
ID: 16897888
Check the link I pasted...that's exactly what I'm helping him do.
J
0
 
LVL 65

Accepted Solution

by:
rockiroads earned 250 total points
ID: 16897985
When u call CreateDialog, it returns the filename selected

imagine the value returned is held in a variable called sFile

to import that sFile being a delimited file, with headers (last parameter)

DoCmd.TransferText acImportDelim, , "tablename", sFile, True

0
 

Author Comment

by:oogooglies
ID: 16898189
Thanks for your help, i have just got there before refreshing... slightly differently but basically the same....
0
 

Author Comment

by:oogooglies
ID: 16898200
Thanks jefftwilley, but rockiroads solution fits the bill perfectly. Cheers for your help
0
 

Author Comment

by:oogooglies
ID: 16900750
rockiroads,

Can a similar dialogbox be used to save data selected from a query into a file..... Again so i acts and feels like windows?

Thanks

Anthony
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question