T
T
Can someone help me on this? I have a form with a
button. When someone presses the bitton another form
opens up which asks the person to select a drive they want
to use to download a txt file. After they insert a drive
letter and select ok then it should pass that vai\riable
to the main form for it to continue downloading. here is
my cod from the main then the drive form.
Private Sub drive_Click()
On Error GoTo Err_drive_Click
DoCmd.OpenForm "frmDataDrive", , , , , acDialog
Dim fDrive1 As Variant
fDrive1 = Forms!frmDataDrive!txtDrive
DoCmd.Hourglass True
DoCmd.TransferText
acImportDelim, "", "tblPeopleData", "fdrive1://tblPeopleDat
a.txt", True, ""
DoCmd.Hourglass False
Exit_drive_Click:
Exit Sub
Err_drive_Click:
MsgBox Error$
Exit Sub
End Sub
Private Sub cmdOK_Click()
On Error GoTo cmdOk_Click_Err
Forms![frmDataDrive].Visible = False
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmMain"
DoCmd.OpenForm stDocName, , , stLinkCriteria
cmdOk_Click_Exit:
Exit Sub
cmdOk_Click_Err:
Resume cmdOk_Click_Exit
End Sub
Thanks for any suggestions
button. When someone presses the bitton another form
opens up which asks the person to select a drive they want
to use to download a txt file. After they insert a drive
letter and select ok then it should pass that vai\riable
to the main form for it to continue downloading. here is
my cod from the main then the drive form.
Private Sub drive_Click()
On Error GoTo Err_drive_Click
DoCmd.OpenForm "frmDataDrive", , , , , acDialog
Dim fDrive1 As Variant
fDrive1 = Forms!frmDataDrive!txtDrive
DoCmd.Hourglass True
DoCmd.TransferText
acImportDelim, "", "tblPeopleData", "fdrive1://tblPeopleDat
a.txt", True, ""
DoCmd.Hourglass False
Exit_drive_Click:
Exit Sub
Err_drive_Click:
MsgBox Error$
Exit Sub
End Sub
Private Sub cmdOK_Click()
On Error GoTo cmdOk_Click_Err
Forms![frmDataDrive].Visible = False
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmMain"
DoCmd.OpenForm stDocName, , , stLinkCriteria
cmdOk_Click_Exit:
Exit Sub
cmdOk_Click_Err:
Resume cmdOk_Click_Exit
End Sub
Thanks for any suggestions