Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 36
  1. #16
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Everything you are asking about is definitely possible to do. I have a complete document management module that I add to my most of Access applications.



    Quote Originally Posted by justinwright View Post
    I can see where it opens files, and stores a location for the files already there (they seem independently loaded, not through the program). How would you remove a file? When said file is removed, I'd like it removed from the actual system if possible, as well as all the links to it (the Stored Path in your example) removed as well.
    Sure. The way I like to handle this is to use the Before delete event to Confirm the deletion. I also ask the use if they want to also remove the external file.

    In reality I just flag the record as deleted and a flag to delete the file. I filter those out from view by the user. See the previous post on this subject above.


    Quote Originally Posted by justinwright View Post
    How would you add it? Say, if you had a file on the desktop, to copy it and rename it to the appropriate thing (ie the concatenation mentioned earlier of the NUMBERONE field + _ + number one through three depending if one or two exist for easy referencing) all through a form/browse control.
    I current use the FileSytemObject (FSO) for the file manipulation. (Move, rename, delete, get file properties etc.)

    Quote Originally Posted by justinwright View Post
    I like the idea, and its basically exactly what I'm looking for, if there is some way to delete the file and to add one (initially through the input screen - as you're entering the record for the first time - or an "add info" screen - adding to a current record, looked up by NUMBERONE - as well) and the record be kept.
    A simple way to handle this is to use a sub form.

    Have you used a sub form in Access?

  2. #17
    justinwright is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    104
    I haven't used a sub form before in Access. I'm fairly new overall, as I'm sure is obvious by my complete lack of clue and obviously "struggling to comprehend" manner. I'll look over it tonight and tomorrow and see what I can figure out, but thank you loads for the help you've provided so far

  3. #18
    justinwright is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    104
    So after trying out the subform, I would rather use something like the example that you posted.

    I could get it to display the attachments per record for the bound subform, but you had to use the arrows to inidividually navigate them (which there will be WAY too many records to do that in a timely manner), plus the database size is an issue that bugs me fairly badly, admittedly.

    I was looking through your example (and admittedly I copied it over to my current project, keeping the copyright notices intact), but when it's in my project I'm getting a #Name? error in the boxes (form header/footer works as in the example, though). Experimentally, the error it gives me when I click View File is "Run-time error '2424': The expression you entered has a field, control, or property name <project name> can't find."

    I know it seems like I want to be spoon-fed here, but after looking at the modules (I had originally intended to design my own so I wasn't ripping anyone's ideas off), I honestly was completely and totally lost. I looked on your site, but it seems no more examples are listed, and I was wondering if you might have a few more hidden away (possibly a readme with some hints on how to implement it?).

    All I have left in the current project I'm working on is figuring out a way to attach them initially (initial input), be able to go back and add more at a later date (for more PDF's added, up to 3 total), have a way to open the current attachments for a particular record easily, and a way to remove them.

    In any case, you have helped me ridiculous amounts so far, and I greatly appreciate it.

    EDIT: The error seems to have been just from me being retarded and doing the whole unbound form thing, lol, but I'm still unfortunately at a standstill on the implementation of the desired operations.

    I also see that it will add them to the record (ie where the file is currently stored). Is there a way to copy the file to the directory and do the whole file name concatenation thing? Also is there a way to display the ones associated with the NUMBERONE field on the form "Look Up" (unbound form)? At the moment it just shows ALL (well, only one) of the files that are linked for any of the entires.

    I current use the FileSytemObject (FSO) for the file manipulation. (Move, rename, delete, get file properties etc.)
    I've looked at the MSDN articles for it but I'm still kind of struggling, but I'll try to see what I can figure out in the meantime. And the MSDN article I found at:

    http://msdn.microsoft.com/en-us/libr...50(VS.85).aspx

    Acts like it's only for txt files, though I'm sure I'm just mistaken.

    I was thinking perhaps having the input screen create a folder upon initial input (titled after the NUMBERONE field), then using that "Document Folder" field and adding the file folder name for concatenation, but it still begs the question for removing said files and copying/renaming them and placing them in the appropriate dir.

    EDIT2: In trying to make it do something of that nature, I edited the on load event from:

    Code:
    Me.txtFolder = CurrentProject.Path
    To

    Code:
    Me.txtFolder = CurrentProject.Path & "\" & Forms![Look Up].NUMBERONE.Value
    And the Document Folder value seems to be working correctly, but for some reason it's only showing a slot for one value for the attachments.

    Plus, when I open it in different directories, it's still listing the attachments for all the entires. Not sure if I'm doing something wrong, though.

    If I'm just talking in circles and making no sense, you can feel free to PM me your e-mail and I can send you a copy (it's only about 1.5 MB compacted total, pre FE/BE split). Otherwise I won't trouble you with it and just keep the questions general and try to work with it.
    Last edited by justinwright; 09-30-2010 at 12:00 PM.

  4. #19
    justinwright is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    104
    I can't help but assume it has something to do with using it as a subform instead of a form... would that solve the problem?

  5. #20
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    I just PMed you my email address so you can send me a copy of your database

  6. #21
    justinwright is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    104
    I e-mailed it to you, sorry to be such a bother :\

  7. #22
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Not a problem.

    I will watch for your email.

  8. #23
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Got your database.

    There is only a single table. When I tried to view the design I get an error message about a missing table.

    I did not see a single sub form.

    Are you sure you sent the correct database? The one you sent does not appear to have any of the the things you say you are trying.

    If it is, then it looks like you are still trying to use the Attachment field.

    If you want to use a sub form or my example then you will not be able to use the Attachment data type. You will need an additional table for the attachments.

  9. #24
    justinwright is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    104
    Yeah, I was actually just about to post to explain.

    I left the attachment data type on there (for now) until I get the doc man working, then I'll remove it.

    I also realize now that I look at it that I sent you a really outdated copy, the updated one is on my flash drive. I'll be re-emailing it to you in about 2 hours. Sorry about that >_<.

    When I get you the updated copy, you'll need to right click the main form tab and close it (since the main form is actually bound to the table... I'm not entirely sure why I did that, so perhaps I'll change it at some point) before opening the design view of the table.

    EDIT: Sent it, thanks!

  10. #25
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    I have looked at your database.

    I see that most of your forms are unbound. AFAIK, you can not easily use a sub form on an unbound form. In Access you generally want to use bound forms. I have created literally 1000's or forms to enter and display data. I might have used two maybe five at the most that were unbound. This is not the same as menu forms or dialog forms which tend to be unbound.

    Note: One of Access's greatest strengths as a Rapid Application Development (RAD) tool in the bound forms and sub form. I would urge you to learn how they work. When you go unbound you really are losing most of the advantages Access offers.

    I did not see a child table to the hold the attached file paths. That will be needed to for creating a bound sub form.

  11. #26
    justinwright is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    104
    Ah, I thought the bimDocsMgr table held the file paths, I suppose I'm a bit more clueless than I thought then, since in DocMgrDesc it shows the file path I thought

  12. #27
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Quote Originally Posted by justinwright View Post
    Ah, I thought the bimDocsMgr table held the file paths, I suppose I'm a bit more clueless than I thought then, since in DocMgrDesc it shows the file path I thought
    The bimDocsMgr does hold the file paths. By itself it is not related to any other table for linking files.

    I usually need to be able to link the same file to multiple records in the same table or another table(s). This is when I use the bimDocsMgrRelated table.


    Will you need to link a file to multiple records?

    Also, will this database be used by multiple users at the same time?

  13. #28
    justinwright is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    104
    I only need to be able to link multiple files to one record, not multiple records to one file.

    And yes it will be split into FE/BE, but I was working everything out pre-split for simplicity sake

  14. #29
    justinwright is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    104
    Any word on it?

    Just as a bit more clarification in case I was vague, a single entry (the NUMBERONE field) could have multiple (and likely will) attachments (up to 3, 5 if I can get them), but the attachment files will never be linked to multiple NUMBERONE entries.

    There will be multiple users using this at once, so that's why I was going to split it and put the back end on the shared drive (already have a few other projects and such I've done in similar fashion). Since it's being used at the moment with the 2007 attachment data type, it's already split.

    Like I said, though, with the project like it was the way I sent it to you (I have the attachment 2007 field working for now but I am not content with it due to size limitations being an issue), it would show all the attachments in the document manager. I just needed a way (a where statement possibly?) to isolate it per-folder (I had the input screen creating a folder inside the dir based on the NUMBERONE value when I was testing it at one point, I think I just commented it out and left the code in there, or perhaps in the copy I sent you it was still actively doing it) and only display the attachments in that folder, which would only contain the attachments for that particular record.

    It seems like there would also be an easier way to permanently link the files (like if the drive letter always stayed the same? which it does), whereas the docmgr seems to be more dynamic. I'm okay it with being permanently linked, since they will never be moved around or anything. It will stay on the S:\ drive that we have shared here in the specified directory, if that's any help.

  15. #30
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    ... like if the drive letter always stayed the same? which it does ...
    Maybe for today.

    I have been doing this a long time. I can tell you the only sure things I have learned is the that things will change.

    Unless this app has a very short life span or the business is shutting down. Thing change way to much in the computer hardware/software world to believe anything will NOT change. You are lucky if things do not change within two years.

    Since you want to link only a document to only one record then you will need to create a simple one-to-many relationship between your table and a documents table. You can use the table from my example and modify it to meet your needs.

    Do you have any specific question on how to do something?
    Last edited by HiTechCoach; 10-27-2010 at 09:13 AM.

Page 2 of 3 FirstFirst 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Exporting to Excel Date Stamped File
    By BED in forum Import/Export Data
    Replies: 1
    Last Post: 08-07-2010, 05:53 PM
  2. Query Based On Date Ordered
    By dr_destructo in forum Queries
    Replies: 2
    Last Post: 07-15-2010, 03:34 PM
  3. Report based on date
    By Dega in forum Reports
    Replies: 3
    Last Post: 06-11-2010, 10:05 AM
  4. Date format exporting to txt
    By timpepu in forum Access
    Replies: 1
    Last Post: 04-20-2010, 08:20 AM
  5. Numerical Value based on Date
    By jbarrum in forum Access
    Replies: 4
    Last Post: 03-11-2010, 01:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums