Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Common Dialog Box

Status
Not open for further replies.

Hm786

Programmer
Apr 5, 2001
88
US
Hi,

I am trying to multiselect the files from the common dialog box in MSAccess and ftp to the server. Right now I am able to select one file at a time and able to do multiselect. Can anybody help me in this issue? I also tried to use the flags but not working.


Thanks,
Hamida
 
Any chance you could post your actual code and where you are stuck ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Private Sub Command6_Click()
'this is an extract for all the Zip files
'FTP them to the Mainframe
'Added by HBM on 11/16/2006 as per Ann's request
Dim Db_Curr As Database
Dim Rs_Curr As Recordset
Dim St_OutPath As String
Dim St_OutFile As String
Dim St_FtpFile As String
Dim St_date As String
Dim lngFlags As Long

On Error GoTo ProcessError

Set Db_Curr = CurrentDb

St_OutPath = FileParse(Db_Curr.Name, 2)

lngFlags = ahtOFN_ALLOWMULTISELECT Or ahtOFN_EXPLORER Or _
ahtOFN_FILEMUSTEXIST Or ahtOFN_HIDEREADONLY Or ahtOFN_NOCHANGEDIR

With CommonDialog3
.InitDir = St_OutPath

.DialogTitle = "Open"
.CancelError = True

'ToDo: set the flags and attributes of the common dialog control

.Filter = "ZIP Files (*.*)|*.ZIP"
.flags = lngFlags
.ShowOpen
If Len(.FileName) = 0 Then
DoCmd.Hourglass False
Exit Sub
End If
MsgBox (lngFlags)
St_FtpFile = .FileName
St_FtpFile = FileParse(St_FtpFile, 3)
MsgBox (St_FtpFile)

End With


St_date = Format(Now(), "mmddyy")
St_OutFile = St_FtpFile
'St_FtpFile = "nmr_cable_service_" + St_date + ".csv"

'MsgBox (St_OutFile)

pF_ProcLog "CREATING " + St_FtpFile + " FILE"

Form_EXTRACT_DIG_SIM_STATIONS.PROCESS_LOG.Requery
Form_EXTRACT_DIG_SIM_STATIONS.Repaint
Set Db_Curr = Nothing


If pF_FtpPut("proxima", "tvlistings", "tvdata", St_FtpFile, St_OutFile, "BINARY") = True Then

'MsgBox "True"
MsgBox St_FtpFile + " FTP TO proxima@nielsenmedia.com "


This dialog box only let me select a single file not multiple files.
 
What is CommonDialog3 ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
It is active x control for the opendialog box inserted from the access more tools. MSComDlg.CommonDialog.1 class.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top