Consulting

Results 1 to 10 of 10

Thread: Posting information from a form to a selected field in a table

  1. #1
    VBAX Newbie
    Joined
    Feb 2020
    Posts
    5
    Location

    Posting information from a form to a selected field in a table

    Hello all,

    I am fairly new to access(at least programming in it) and was curious to pick your brains for the most effective solution to a problem

    I work for an office where I am trying to keep records specific to individuals easily manageable and viewable

    Basically I have a table that Identifies individuals through a number and their name and I want the form I am creating to be able to open a file dialog box to locate a particular PDF file that contains identifying information to that individual. I then want to be able to save that file location to the table and finally be able to view their entry in said table in a subform datasheet view after querying that individual, so that the location that is saved can just be clicked on and opens the pdf in the associated viewer on the users computer. I hope that I am explaining this well any clarification or questions please feel free to ask. Basically I am just looking for some guidance on the most efficient way to make this all work.

    Thanks so much!!
    Brian

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,140
    Location
    So, you need to open Explorer to display pdf files in a folder?
    Is the folder always the same?
    When the user selects the pdf file you want to store it's path in the table.
    Does there need to be some kind of verification that they open the correct pdf file?
    You then want to be able to open the pdf file to view the data.

    What version of Access are you working with?

  3. #3
    VBAX Newbie
    Joined
    Feb 2020
    Posts
    5
    Location
    The folder will not always be the same as their will be subdirectories. The Drive specification will always be the same as the database will be saved and run off of an external USB hard-drive which will be the same Drive as the PDF Files. There does not need to be a verification that they open the correct pdf file.

    I am working with Access 2013

  4. #4
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,140
    Location
    Let me know if the attached database works in Access 2013, you may have to change the VBA Editor's Library References to suit 2013.
    Attached Files Attached Files

  5. #5
    VBAX Newbie
    Joined
    Feb 2020
    Posts
    5
    Location
    So this didnt work for a few reasons, first of all there is no referenced table to save the location to and second of all when you choose the file in the file dialog box that opened up you can only press cancel and not open the file so it does not populate the box with a location.

    Brian

  6. #6
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,140
    Location
    Brian, It is only intended to test if you can use the Modules to browse to a folder, which appears to be OK.
    Do you get the Unbound form field populated with the full path to the file if you double click a file?
    You can of course add a table and then set the form field's Control Source to the table field.

  7. #7
    VBAX Newbie
    Joined
    Feb 2020
    Posts
    5
    Location
    No it does not populate the field when I double click the file
    also the open button in the dialog box changes to cancel when i click on a file

  8. #8
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,140
    Location
    That is a problem as my 2007 version populates the Field.
    Try this other version.
    Attached Files Attached Files

  9. #9
    VBAX Newbie
    Joined
    Feb 2020
    Posts
    5
    Location
    Yes that did work, thank you for your assistance.....now it's just time to figure out how to apply that to my individual needs....wish me luck!!

    Brian

  10. #10
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,140
    Location
    Brian, good luck, let me know if you get stuck with the implimentation.

Posting Permissions

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