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 

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros