Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

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

Avatar of Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.ScFlag for Zambia asked on
Microsoft Access
6 Comments1 Solution18 ViewsLast Modified:
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