I have a basic application that is using and OLE Object to display photos on a form. I want to upload .jpg but it will only allow me to upload .bmp
On the click of the add button a browse window opens to find the photo on my computer, I select it and press ok. If I selected a .bmp then the photo gets attached to the record, if I choose .jpg and press ok it stays blank.
I commented out the code to only allow .bmp and just left "all files" uncommented. HELP!
(screenshot of GUI)
In the table the field is called:
olePhoto and the data type is: OLE Object
This is the code:
Private Sub btn_add_Click()
Dim fd As FileDialog
Set fd = FileDialog(msoFileDialogFi
.AllowMultiSelect = False
.Filters.Add "All Files", "*.*"
'.Filters.Add "Bitmap Files", "*.bmp"
If .Show Then
olePhoto.SourceDoc = .SelectedItems(1)
olePhoto.action = acOLECreateLink
Private Sub btn_close_Click()
DoCmd.Close acForm, Me.Name, acSaveNo
Private Sub btn_remove_Click()
olePhoto = Null