Hi All,
I am starting to use MS Access 2003, the orginal application was created in XP version. When I insert the picture it is no longer insert it like a pictre, it inserts it like a package and I can't see the preview.
What's wrong for 2003 and good for XP?
On Error Resume Next
Dim cdlg As New CommonDialogAPI
Dim lngFormHwnd As Long
Dim lngAppInstance As Long
Dim strInitDir As String
Dim strFileFilter As String
Dim lngResult As Long
lngFormHwnd = Me.hwnd
lngAppInstance = Application.hWndAccessApp
strInitDir = "C:\My Documents\"
strFileFilter = "Pictures Files (*.jpg, *.bmp, *.gif)" & _
Chr(0) & "*.jpg; *.bmp; *.gif" & Chr(0)
lngResult = cdlg.OpenFileDialog(lngFormHwnd, _
lngAppInstance, strInitDir, strFileFilter)
If cdlg.GetStatus = True Then
Me![Pict].SourceDoc = cdlg.GetName
Me![Pict].SizeMode = acOLESizeZoom
Me![Pict].Verb = acOLEVerbShow
Me![Pict].Action = acOLEVerbPrimary
Else
MsgBox "No file selected."
End If
Thanks for any help
I am starting to use MS Access 2003, the orginal application was created in XP version. When I insert the picture it is no longer insert it like a pictre, it inserts it like a package and I can't see the preview.
What's wrong for 2003 and good for XP?
On Error Resume Next
Dim cdlg As New CommonDialogAPI
Dim lngFormHwnd As Long
Dim lngAppInstance As Long
Dim strInitDir As String
Dim strFileFilter As String
Dim lngResult As Long
lngFormHwnd = Me.hwnd
lngAppInstance = Application.hWndAccessApp
strInitDir = "C:\My Documents\"
strFileFilter = "Pictures Files (*.jpg, *.bmp, *.gif)" & _
Chr(0) & "*.jpg; *.bmp; *.gif" & Chr(0)
lngResult = cdlg.OpenFileDialog(lngFormHwnd, _
lngAppInstance, strInitDir, strFileFilter)
If cdlg.GetStatus = True Then
Me![Pict].SourceDoc = cdlg.GetName
Me![Pict].SizeMode = acOLESizeZoom
Me![Pict].Verb = acOLEVerbShow
Me![Pict].Action = acOLEVerbPrimary
Else
MsgBox "No file selected."
End If
Thanks for any help