"Report" is a reserved word in Access and shouldn't be used for object names.
I would use
Code:
Private Sub EsportaBtn_Click()
Dim FlName As String
Dim ReportName As String
ReportName = "ProfiloPB"
FlName = "C:\Users\diego\OneDrive - Indipendente\Lavoro\HH\Candidati\" & Me.Regione & "\" & Me.NomeCognome & "\" & Me.NomeCognome & " - " & Me.Comune & " - " & Me.Azienda & ".pdf"
' Debug.Print FlName
DoCmd.OutputTo acOutputReport, ReportName, acFormatPDF, FlName, True
End Sub
or even better
Code:
Private Sub EsportaBtn_Click()
Dim FlName As String
FlName = "C:\Users\diego\OneDrive - Indipendente\Lavoro\HH\Candidati\" & Me.Regione & "\" & Me.NomeCognome & "\" & Me.NomeCognome & " - " & Me.Comune & " - " & Me.Azienda & ".pdf"
' Debug.Print FlName
DoCmd.OutputTo acOutputReport, "ProfiloPB", acFormatPDF, FlName, True
End Sub
I don't know if this is the problem, but .........