Solved

File open Prompt Using in VBA

Posted on 2006-06-13
10
335 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

617 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