In a DAO db, Access 2013, I am receiving a Compile syntax error on the Set Image line in the msoFileDialogSaveAs application. I'm best-guessing on the code for how to save the jpg file. After research across forums and the MS Developer/Support DB, I've experimented and this is the closest I've come to resolution. Any ideas on how to successfully allow the end user to save a jpg file to the system, but not the db itself, from inside access? I am uncomfortable using the API at this point.
Option Compare Database
Option Explicit
Dim FileLocation As String
Dim DiagFile As FileDialog
Private Sub Jpgbtn_Click()
Set DiagFile = Application.FileDialog(msoFileDialogSaveAs)
DiagFile.Title = "Save .jpg File As..."
DiagFile.InitialFileName = "*.jpg"
DiagFile.AllowMultiSelect = False
If DiagFile.Show Then
FileLocation = DiagFile.SelectedItems(1)
Set Image = CreateObject("*.jpg")
>>>>>Set Image = file.Item "*.jpg"
Image.SaveFile FileLocation
End If
MsgBox (" Jpg successfully saved. ")
globals.ActivityLog "Jpgbtn"
End Sub