Avatar of Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc
Flag for Zambia

asked on 

Still failing to save data from Ms Access into note pad text format

Dear All;

I have tried the entire weekend to save the Ms Access 2016 & 2019 data string into notepad text format I have failed I keep on getting the messages below, its quite devastating at this point, where do I go wrong:

Public Function GetSaveFilename(FileLoc As String) As String
Dim n as integer
Dim Dialog As FileDialog
Dim strData as string    
Set Dialog = Application.FileDialog(msoFileDialogSaveAs)
n = FreeFile()
Print #n, strData
Close #n
    With Dialog
        .InitialFileName = FileLoc
        .FilterIndex = 2
        .title = "Save As"
        If .Show <> 0 Then
            GetSaveFilename = .SelectedItems(1)
        End If
    End With
d Function 

Open in new window

Microsoft Access

Avatar of undefined
Last Comment
Gustav Brock

8/22/2022 - Mon