Z
Zoe
I have a form that has 2 command buttons.
This one runs a Macro:
Private Sub impbuild_Click()
On Error GoTo Err_impbuild_Click
Dim stDocName As String
stDocName = "Build Export"
DoCmd.RunMacro stDocName
Exit_impbuild_Click:
Exit Sub
Err_impbuild_Click:
MsgBox Err.Description
Resume Exit_impbuild_Click
End Sub
This one exports a text file:
Private Sub exp_Click()
DoCmd.TransferText acExportDelim, "Export Reconciliation Export
Specification", "Export Reconciliation", [Forms]![Menu]![Path] & "\" & "BOS"
& Format([Forms]![Menu]![bosdate], "mmddyyyy") & "IMPIMPORT" & ".txt"
End Sub
I would like to use one command button to do both. The Macro must run
first, before the file export.
Is this possible?
Thanks,
Zoe
This one runs a Macro:
Private Sub impbuild_Click()
On Error GoTo Err_impbuild_Click
Dim stDocName As String
stDocName = "Build Export"
DoCmd.RunMacro stDocName
Exit_impbuild_Click:
Exit Sub
Err_impbuild_Click:
MsgBox Err.Description
Resume Exit_impbuild_Click
End Sub
This one exports a text file:
Private Sub exp_Click()
DoCmd.TransferText acExportDelim, "Export Reconciliation Export
Specification", "Export Reconciliation", [Forms]![Menu]![Path] & "\" & "BOS"
& Format([Forms]![Menu]![bosdate], "mmddyyyy") & "IMPIMPORT" & ".txt"
End Sub
I would like to use one command button to do both. The Macro must run
first, before the file export.
Is this possible?
Thanks,
Zoe