Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting a file....
Message
From
05/02/2002 00:05:36
 
 
To
04/02/2002 20:36:25
General information
Forum:
Microsoft Office
Category:
Access
Miscellaneous
Thread ID:
00615191
Message ID:
00615237
Views:
15
>I am an amature in access programming (but work deeply in VFP), but do lots of data design. I need to let the user select a file from a directory, and then import the file data into the access database. I don't really have a lot to go on here so I am hoping someone can help me out??
>
>TIA
>
>Ric

It's fairly simple with the MS Common Dialog ActiveX control. Just drop it in the form and then:
With Me.CommonDlg1
  .Filter = "Excel Template (*.xlt)|*xlt"
  .InitDir = "d:\temp\mypath" 
  .DialogTitle = "Select Excel Template"
  .ShowOpen
  Me.txtControl.Text = .FileName
End With
Where CommonDlg1 is the name of the control and txtControl is a textbox. After you have the file name you can do the import with the TransferDatabase method of the DoCmd object. Look it up on the help for the correct parameters for your file type. HTH
Previous
Reply
Map
View

Click here to load this message in the networking platform