Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2006

    Unanswered: Help Again - Final Phase of My Access Database - Add Files

    Hello Again,

    After make my query work fine, now i want to know if it's possible to make a very useful thing to my db.

    I've searched a Lot at this forum, but i didn't find nothing that could help.

    My Question is:
    I have an access db and i have a principal form that contains all personal data from the co-workers that work in my office, now i want to know if it is possible to create a button that allows to add a file to a specific record.

    Co-worker John Want to add his C.V to his record and co-worker Steve when is viewing the db, he also could view the John C.V.

    The only thing about adding an attachment in access that i have found its for access 2007, is it anyway to make in access 2000/2003?

    Thanks a Lot

  2. #2
    Join Date
    Jul 2002
    Island of Dots
    Why don't you just store the path to each CV in a Text field? This would be best used if all CVs were stored in a single folder. Show the path as a link/url, which when clicked, would open the document in Word.

  3. #3
    Join Date
    Dec 2006
    It's not a bad ideia, but i also want that co-workers had the ability to add their C.v's.

  4. #4
    Join Date
    Oct 2002
    Leicester - UK
    add a table called files in here store the file name and the user thee files associated with that way you have as many file for each person as you want and you can use the hyperlink command to open them, however you will need to make sure the files are placed on a area accable by all users, this could be done with VB's filemanagemnet functions
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  5. #5
    Join Date
    Dec 2006

    I've already done what i wanted.

    Create a New Form with two text boxes(Name and Filepath) and make a link to the Primary Form, and after that created two control buttons, one to add the file, the second to view the file!
    Here's the code, it only works with ms word files.

    Private Sub cb2_Click()
    Dim sSourcePath As String
    Dim objword As Object
    Dim strFile As String

    sSourcePath = Me.FilePath

    DoCmd.RunCommand acCmdSaveRecord

    If fIsFileDIR(sSourcePath) = -1 Then

    'Select Case ParseFileName(sSourcePath, 3)

    Set objword = CreateObject("Word.Application")

    strFile = Me.FilePath

    objword.Visible = True
    objword.Documents.Open strFile

    End If

    End Sub

    Private Sub Cb1_Click()

    Dim strPath As String

    CDSearchString = MakeFilterString("Word Document Files (*.doc)", "*.doc")

    CDCaption = "Please Select a Document"

    If IsNull([FilePath]) Or Me.FilePath = "" Then
    CDInitDir = "C:\"
    CDInitDir = [FilePath]
    End If

    strPath = LaunchCD(Me)
    If Not strPath = "No Document Selected" Then
    Me.FilePath = strPath
    End If

    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts