F
Frank Situmorang
Hello,
By the help of all of you good people, I have made a button on the form to
transfer the file by browsing first the folder. But how can we be able to see
all the files in the folder.
The VBA in this site can only borwse the folder, but can not see the files
in the folder.
http://www.mvps.org/access/api/api0002.htm
Private Sub cmdSendDatatoexternal_Click()
On Error GoTo Err_cmdSendDatatoexternal_Click
Dim sDest As String
'Get the folder
sDest = BrowseFolder("")
'Add the file
sDest = sDest & "\Hahomion_be.mdb"
'Debug.Print sDest
'the debug statement prints the value of sDest to your immediate window
'press ctrl+G to see the immediate window
'Make sure the \ is between the folder and filename
'If not, make sDesc = sDesc & "\yournewfilename.mdb"
FileCopy "C:\Churchdata\ChurchdataConso\BkEnd\Hahomion_be.mdb", sDest
Exit_cmdSendDatatoexternal_Click:
Exit Sub
Err_cmdSendDatatoexternal_Click:
MsgBox Err.Description
Resume Exit_cmdSendDatatoexternal_Click
End Sub
Thanks for any help.
Frank
By the help of all of you good people, I have made a button on the form to
transfer the file by browsing first the folder. But how can we be able to see
all the files in the folder.
The VBA in this site can only borwse the folder, but can not see the files
in the folder.
http://www.mvps.org/access/api/api0002.htm
Private Sub cmdSendDatatoexternal_Click()
On Error GoTo Err_cmdSendDatatoexternal_Click
Dim sDest As String
'Get the folder
sDest = BrowseFolder("")
'Add the file
sDest = sDest & "\Hahomion_be.mdb"
'Debug.Print sDest
'the debug statement prints the value of sDest to your immediate window
'press ctrl+G to see the immediate window
'Make sure the \ is between the folder and filename
'If not, make sDesc = sDesc & "\yournewfilename.mdb"
FileCopy "C:\Churchdata\ChurchdataConso\BkEnd\Hahomion_be.mdb", sDest
Exit_cmdSendDatatoexternal_Click:
Exit Sub
Err_cmdSendDatatoexternal_Click:
MsgBox Err.Description
Resume Exit_cmdSendDatatoexternal_Click
End Sub
Thanks for any help.
Frank