Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 32
  1. #16
    voodoo_ca is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    30

    Hey rpeare,
    Wondered if you tried anything with my database?
    Chad

  2. #17
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I haven't no, I thought you were going to supply a database with all the subforms working. I would also like to see the code you're running to open the PDF for the part of your database that is working and I'm assuming that code is tied to the subform that's not working in the copy of the database you uploaded.

    If your PDF is named with a string that is contained in your PONumber field though it shouldn't be too hard to locate/open the file using the same method you're using now. can you give me an example of the file name/names of the pdf's associated with order number 4444.

  3. #18
    voodoo_ca is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    30
    I did some adjusting and made the secondary contacts subform work - sorry about that.
    Should work fine this time....
    The PO numbers are in the format XXXX-YYYY where XXXX is a random number, and the YYYY is the order number for the customer. That way we can easily tell when a product is ordered for a particular customer and their order.
    So for example 3243-4444.pdf would be for the order number 4444. I am saving the PDF files in exactly that format.

    I cant seem to get the front end file down to the 500kb file size limit since I added the subform back in - Any tips?
    Its hard to make things fit...

    Thanks
    Chad
    Attached Files Attached Files

  4. #19
    voodoo_ca is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    30
    Oh,
    This was the code I am using to open the PDF for the order number.
    I have a form built where only one order number can be shown at a time, so when you click the button that I have on the form it adds the order number infront of .pdf and opens the corresponding file.
    Right now the order numbers are stored in format XXXX.pdf so 4444.pdf

    Private Sub Command30_Click()
    FollowHyperlink "\\Frontdesk\FrontDesk\PDFOrders\" & Order & ".pdf"
    End Sub

  5. #20
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    don't try uploading the database itself, zip it up first, then upload the zip file. Also compact and repair it before you zip it

  6. #21
    voodoo_ca is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    30
    Wow,
    I am ashamed I didnt think about that at all...

    Thanks
    Chad
    Attached Files Attached Files

  7. #22
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    OK i was wrong, the command to open your PDF isn't attached to the subform that was not working and I don't see the code in your form setup that would do it either. So I re-read the thread.

    and you can correct me where necessary:

    1. You have a PDF for both purchasing an item from a supplier AND a purchase order for your customers ordering that same item from you.
    2. You have a system in place where you can view the PDF of the customers ordering from you and are looking for a way to bring up the orders you placed with your supplier by the same type of method.
    3. The Files for YOUR CUSTOMERS are named PPPP.pdf where PPPP is the order number.
    4. The files that YOU have ordered from your supplier are named XXXX-PPPP.pdf where PPPP is the order number and XXXX is the product number?

    So in essence you want to be able to click on an item in the Vendor PO Subform and open the pdf file with the name displayed in the PONumber field?

  8. #23
    voodoo_ca is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    30
    Yes, exactly - I want to open a PDF with a specific name - the problem is I dont know how to choose one of them if ther are, say 4 different ones... because its possible that they have a door, shutters, sliding door... etc. Each of those would have a unique number like 3453-4444.pdf and 4565-4444.pdf and 4323-4444.pdf

    Chad

  9. #24
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Well it comes back to the same question, which I still do not know. Are there files named for the PO number in that subform in the lower right corner? so, in the case of your example order 4444 you have 3 parts ordered so do you have, in your directory files named:

    1155-4444.pdf
    1156-4444.pdf
    1157-4444.pdf

    If you do you can reorganize that subform and put in a command button to open the PDF on that subform where it tries to open a file with the [ponumber] & ".pdf" name.

  10. #25
    voodoo_ca is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    30
    Exactly - In that lower right corner, we will add in the PO numbers for all of the files associated with the customer order.
    In a folder on the computer there is PO's numbered exactly the same as the ones you have above.
    For order 4444 - Those 3 PO's would all be files on a computer.

    When you say "reorganize" - do you mean redesign that subform?
    I am still not sure how to select between multiple PO's within that subform - maybe you would just type in the number you wanted to open?

    Chad

  11. #26
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    voodoo_ca.zip

    Here's your database back, has all your original data plus 3 pdfs. Make sure they're all in the same directory or they won't work, re-establish the links to the tables on your front end.

    I never use wizards for creating subforms (which I think you did) so I redesigned the subform you're talking about, added a button to the detail section of each line that has the same code you're using for your outgoing purchase orders and it works assuming the file has the exact same name .pdf as your PONumber field.

  12. #27
    voodoo_ca is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    30
    Hi Rpeare,
    Thanks for the reply.
    Thats a great solution - it seems simple now that I see how you did it - I didnt think about adding a button to each row as it appeared in the subform. I also didnt realize that it would look for the correct file based on the row that it was aligned with.
    I think you are correct, at some point I would have used a wizard to create the subform. I dont yet understand how to have the information associated correctly when just "building" a subform without a wizard.
    I have a few applications for your idea within the current database, so I am going to try and build that same subform now using your idea.
    Thanks for your help and patience - I appreciate it!

    Chad

  13. #28
    voodoo_ca is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    30
    Rpeare,

    Can I ask you how you start to design the subform? Obviously you pointed out my use of the wizards.
    Do you start a new blank form and then insert it into the other form as a subform?
    Typically I would use the "subform" tool at the top and draw a box where would want the subform.
    Where I struggle is getting the information to show and link properly.

    Thanks
    Chad

  14. #29
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    You have the right of it, just create a new form, give it the data source you want then when you use the form/subform tool instead of going through the wizard you can telling a specific form you want to insert and it will go through a dialog as well to ask you which form you want to use as the subform. The only thing you have to be absolutely sure of is that the RECORD SOURCE of your subform contains the linking field to your main form or it will not work. The linked field does not have to show in your subform, it just has to be part of the RECORD SOURCE (the SQL or query running your subform).

    The very first part of the subform dialog should ask you whether you want to use a query or table or another form and there should be a list of all the forms you have available to put on it. It should also ask you when you click finish to establish the link fields, if it doesn't you can just click the subform and open the properties and you can manually create the link master/link child fields.

  15. #30
    voodoo_ca is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    30
    I need to ask another question about the subform that you built for me.
    I have been trying to use the same idea for the orders that my customers have with me.

    I am unable to get my subform to show multiple items for the same customer.
    Going back to what you did - if there were multiple orders, they would all show up in a list and the list would get larger if there were more orders.
    I have modified my subform to try and do the same thing, but it will only have one row.

    First I thought it might be because I had the subform set to show in a datasheet view as default - Plus, when it was set as a datasheet view the button wouldnt show up.
    I changed it to default as form view, and now I am only getting one record at a time.
    I tried to compare the properties of my form and yours, but I couldnt tell what the difference was.

    Am I explaining myself properly?

    Thanks
    Chad

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

Similar Threads

  1. Replies: 1
    Last Post: 03-02-2012, 10:24 AM
  2. Replies: 9
    Last Post: 09-16-2011, 03:52 PM
  3. Replies: 3
    Last Post: 05-02-2011, 07:34 AM
  4. opening a second form from main/subform
    By PJPCVP in forum Database Design
    Replies: 1
    Last Post: 10-29-2010, 09:50 PM
  5. Value List with opening a file.
    By seaper in forum Forms
    Replies: 0
    Last Post: 10-21-2009, 01:32 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