Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert Picture Access 2003

Status
Not open for further replies.

Aerin

IS-IT--Management
Jul 13, 2004
22
0
0
CA
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top