J
jeremy0028
I would like to know if theres a way to insert or store .pdf documents
into access and view the file the way you insert and pics.
For Example i have the following code in my command button for
inserting pics but dont know how to write code for .pdf documents
Thanks In advance
Private Sub cmdInsertPic_Click()
Dim OFN As OPENFILENAME
On Error GoTo Err_cmdInsertPic_Click
' Set options for dialog box.
With OFN
.lpstrTitle = "Images"
If Not IsNull([PicFile]) Then .lpstrFile = [PicFile]
.flags = &H1804 ' OFN_FileMustExist + OFN_PathMustExist +
OFN_HideReadOnly
.lpstrFilter = MakeFilterString("Image files
(*.bmp;*.gif;*.jpg;*.wmf)", "*.bmp;*.gif;*.jpg;*.wmf", _
"All files (*.*)", "*.*")
End With
If OpenDialog(OFN) Then
[PicFile] = OFN.lpstrFile
Forms!frmPicExample!picsubform![imgPicture].Picture = [PicFile]
SysCmd acSysCmdSetStatus, "Afbeelding: '" & [PicFile] & "'."
End If
Exit Sub
Err_cmdInsertPic_Click:
MsgBox Err.Description, vbExclamation
End Sub
into access and view the file the way you insert and pics.
For Example i have the following code in my command button for
inserting pics but dont know how to write code for .pdf documents
Thanks In advance
Private Sub cmdInsertPic_Click()
Dim OFN As OPENFILENAME
On Error GoTo Err_cmdInsertPic_Click
' Set options for dialog box.
With OFN
.lpstrTitle = "Images"
If Not IsNull([PicFile]) Then .lpstrFile = [PicFile]
.flags = &H1804 ' OFN_FileMustExist + OFN_PathMustExist +
OFN_HideReadOnly
.lpstrFilter = MakeFilterString("Image files
(*.bmp;*.gif;*.jpg;*.wmf)", "*.bmp;*.gif;*.jpg;*.wmf", _
"All files (*.*)", "*.*")
End With
If OpenDialog(OFN) Then
[PicFile] = OFN.lpstrFile
Forms!frmPicExample!picsubform![imgPicture].Picture = [PicFile]
SysCmd acSysCmdSetStatus, "Afbeelding: '" & [PicFile] & "'."
End If
Exit Sub
Err_cmdInsertPic_Click:
MsgBox Err.Description, vbExclamation
End Sub