Here is the code but this saves file on my computer I want it should save in Access directly. Thank you
Dim cnn As ADODB.Connection
Set cnn = New ADODB.Connection
Dim fd As FileDialog
Dim var As Boolean
Set cnn = New ADODB.Connection
cnn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & ThisWorkbook.Path & "\File.accdb;Persist Security Info=False;"
Set fd = Application.FileDialog(msoFileDialogSaveAs)
fd.Show
If Not var Then
MsgBox "Enter name to save file"
End If
fd.Execute