[AccessD] Open File Dialog - multiple selections One MoreSimpleQuestion

Mark H MarkH at bitgen.co.uk
Fri May 2 05:17:45 CDT 2003


Thanks very much
 
Mark

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D.Tejpal
Sent: 02 May 2003 08:39
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Open File Dialog - multiple selections One
MoreSimpleQuestion


Mark,
 
In Access 2002, you can also try FileDialog Object. The code given below
will display a dialog box for File Selection. Based upon user's choice,
the variable TargetFile will give Full Path of each Selected File. 
 
-------------
Code Start
-------------
Dim fdg as Object, TargetFile As String
Dim SLF As Variant
 
Set fdg = Application.FileDialog(3)
' Arguments -   1(FileOpen), 2(FileSaveAs), 3(FilePicker),
4(FolderPicker)
 
With fdg
    .Title = Space(71) & "Select  Source  Files"
    .AllowMultiSelect = True
    If .Show <> 0 Then
        For Each SLF In .selecteditems
            TargetFile = Trim(SLF)
' Note - Take Suitable Action Here On TargetFile
        Next
    End If       ' Show
End With     ' fdg
-------------
Code End
-------------
 
Regards,
A.D.Tejpal
----------------------------

----- Original Message ----- 
From: HYPERLINK "mailto:stuart at lexacorp.com.pg"Stuart McLachlan 
To: HYPERLINK "mailto:markH at bitgen.co.uk"MarkH ; HYPERLINK
"mailto:accessd at databaseadvisors.com"accessd at databaseadvisors.com 
Sent: Friday, May 02, 2003 04:07
Subject: RE: [AccessD] Open File Dialog - multiple selections One More
SimpleQuestion


In  the example I gave, was  " OpenFile.lpstrFile = String(257, 0)"
That is large enough for a single file, you will need to enlarge it 
for multiple files.

On 1 May 2003 at 14:59, MarkH wrote:

> Hi again...
> 
> I got the dialog working fine, BUT... If I select more than a handful
> of files then nothing gets returned.
> 
> Is there a limit?
> 
> In some cases I may be looking to select 50 or 60 files at a time...
> 
> Thanks again
> 
> Mark



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003





---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030502/7c755411/attachment-0001.html>


More information about the AccessD mailing list