Solved

File open Prompt Using in VBA

Posted on 2006-06-13
10
329 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

733 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