This looks simple enough to me, but it gives me a type mismatch error.
Private Sub Form_Close()
Dim Msg, Style, Title, Response, MyString
Msg = "Do you want to export to a text file?"
Style = "vbYesNoCancel"
Title = "Export?"
Response = MsgBox(Msg, Style, Title)<=== Code stops here.
If Response = vbYes Then
DoCmd.TransferText acExportDelim, "basic export specification", "participatedinpromo", "promo export.txt"
ElseIf Response = vbNo Then
DoCmd.Close
Else
End If
End Sub
Any help is appreciatd.
TIA
Melanie
Private Sub Form_Close()
Dim Msg, Style, Title, Response, MyString
Msg = "Do you want to export to a text file?"
Style = "vbYesNoCancel"
Title = "Export?"
Response = MsgBox(Msg, Style, Title)<=== Code stops here.
If Response = vbYes Then
DoCmd.TransferText acExportDelim, "basic export specification", "participatedinpromo", "promo export.txt"
ElseIf Response = vbNo Then
DoCmd.Close
Else
End If
End Sub
Any help is appreciatd.
TIA
Melanie