Dlookup to take pdf to the correct folder

hi ,
this is the code that this forum helped me with  but i need some help to modify it 
this code looks at a table for the directory to put my reports in and all is good 
but i really need is that this code looks as the table and selects the directory from a list 
the table is below 
C:\Users\User\Documents\Purchasing
C:\Users\User\Documents\sales
C:\Users\User\Documents\engineering 
i do not want the directory in the code just the location but using the ID as the reference if that is possible 
i have no experience of VBA  so any help appreciated 
On Error GoTo Err_Handler
Const FOLDER_EXISTS = 75
Const MESSAGE_TEXT1 = "No current invoice."
Const MESSAGE_TEXT2 = "No folder set for storing PDF files."
Dim strFullPath As String
Dim varFolder As Variant
If Not IsNull(Me.Invoicenumber) Then
' build path to save PDF file
varFolder = DLookup("Folderpath", "pdfFolder")
If IsNull(varFolder) Then
MsgBox MESSAGE_TEXT2, vbExclamation, "Invalid Operation"
Else
' create folder if does not exist
varFolder = varFolder & "\" & Me.CustomerName
MkDir varFolder
'strFullPath = varFolder & "\" & ME.CustomerName & " " & Me.Invoicenumber & ".pdf"
strFullPath = varFolder & "\" & "Invoice No" & " " & Me.Invoicenumber & ".pdf"
' ensure current record is saved before creating PDF file
Me.Dirty = False
DoCmd.OutputTo acOutputReport, "Invoice report", acFormatPDF, strFullPath, True
End If
Else
MsgBox MESSAGE_TEXT1, vbExclamation, "Invalid Operation"
End If
Exit_Here:
Exit Sub
Err_Handler:
Select Case Err.Number
Case FOLDER_EXISTS
Resume Next
Case Else
MsgBox Err.Description
Resume Exit_Here
End Select
End Sub
steve

hi ,
will i still see any replies to this question  where this thread is now , or where do i look
steve

Similar Messages

  • After doing a Google search - when I click on a link it does not take me to the corect website. Instead it always take me to some icity webpage. How do I fix this so that Firefox takes me to the correct website that the Google search found?

    After doing a Google search - when I click on a link it does not take me to the correct website. Instead it always take me to some icity webpage. How do I fix this so that Firefox takes me to the correct website that the Google search found?

    After doing a Google search - when I click on a link it does not take me to the correct website. Instead it always take me to some icity webpage. How do I fix this so that Firefox takes me to the correct website that the Google search found?

  • My music files are in the correct folder and place but do not appear in my itunes library..help?, My music files are in the correct folder and place but do not appear in my itunes library..help?

    Help! My music files are in the correct folder and place on my laptop but in the library they do not show up. I have Windows 8.1 and am going mad !

    Hi,
    Are these songs iTunes purchases?
    If so you need to hide them. iTunes Store: Hiding and unhiding purchases
    Jim

  • Can't save an edited PDF to the same folder it originated from

    Can't save an edited PDF to the same folder it originated from. Error "cannot save the document is read-only or is open by someone else" and then it prompts to save the document to another folder or change the name of the document.  This is not what I want to do! Using WIndows 7

    Hi JC_AUS,
    Thank You for posting on the forums. This can happen if the preview of the document is opened in preview pane in Windows Explorer.
    Kindly switch off the preview pane and then try the same.
    Thanks,
    Vikrantt Singh

  • [CS3] [JS] Export PDF to the same folder as the InDesign file

    Hi,
    I have written a JavaScript to export an InDesign file to a PDF file.
    The exporting works fine when exporting to a specific folder, but I want the script to export the PDF to the SAME folder as the InDesign file.
    For example, if the Indesign file is in a folder called "Owner's Manuals", I want the script to save the PDF into the same "Owner's Manuals" folder.
    At the moment I have:
    var myFolder = Folder.selectDialog ('Choose a Folder');
    but this dialog defaults to the Desktop every time, forcing me to click 6-7 times to locate the relevant folder where I want the PDF to be saved, which is a waste of time.
    I want the script to do something like the following:
    "Find out the location of this InDesign file, and export the PDF to the same folder"
    I have searched this forum, as well as the Scripting Reference, but without any luck.
    Any suggestions are greatly appreciated.
    Thanks.

    Hi
      Please another another one time check it out..
    //Do not open the PDF Export dialog box. Set "false" to "true" if you want the dialog box.
    myDoc.exportFile(ExportFormat.pdfType, myFile, false, "Press Quality");
    Instead I used
    var ExPDFs= File(Final+myBaseName + ".pdf");
    pdfPreset = app.pdfExportPresets.item("Sample");
    myDoc.exportFile(ExportFormat.pdfType, ExPDFs, false, pdfPreset);
    Here I think u made mistake in "pdfPreset " passing argument...
    I used Sample -> PDF Preset name, but u passing PDF Preset is directly [Press Quality]... thats all.
    Then how come u say this script is not working....like that?.
    I used this script in my Projects U know?.
    Please try to reveal and check throughly after that U say the word "Thanks for your suggestion, but it did not work."
    OK.

  • How to create a pdf with the correct size?

    Hi there
    How do I create a pdf with the correct size? I created several albums and ordered them. Now I want to backup the album and I know how to create a pdf, but when I choose A5 it's to big, when I create my own size it's not the size it should be. The original (made with iphoto) is a small size album 200x150mm. But when I create my own size (200x150) it shows some white borders.
    Does anybody have some tips ore workarounds?
    Yuri
    Imac
    Iphoto 11 (9.4.2)

    Books are designed for and printed on 8.5 x 11 inch stock, US Letter size.  You shouldn't have to select any size.  While viewing the All Pages mode in the book Control-Click on the page and select Save Book as PDF from the contextual menu. 
    That will create a PDF that iPhoto uses to upload and print.  Not all pages will be the same size as the dust jacket will be present in it's full size, 32.8 inches x 8.91 inches:
    If you want a PDF that's designed for your own printing the type Command+P while viewing the All Pages window.  In the first print window click on the PDF button.  It will present you with a contextual menu where you should select Save as PDF.  That will give you an 8.5 x 11 PDF file with all pages the same size.
    OT

  • [svn:bz-trunk] 18055: Moved files to the correct folder

    Revision: 18055
    Revision: 18055
    Author:   [email protected]
    Date:     2010-10-07 04:20:08 -0700 (Thu, 07 Oct 2010)
    Log Message:
    Moved files to the correct folder
    Added Paths:
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/blazeds-spring.xml
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/blazeds-spring.xml.ins tall
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/blazeds.xml
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/blazeds.xml.install
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/ds-console.xml
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/ds-console.xml.install
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/qa-manual.xml
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/qa-regress.xml
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/samples-spring.xml
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/samples-spring.xml.ins tall
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/samples.xml
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/samples.xml.install
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/Catalina/localhost/team.xml
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/localhost.keystore
        blazeds/trunk/servers/apache-tomcat-6.0.26/conf/tomcat-users.xml.install
    Removed Paths:
        blazeds/trunk/servers/apache-tomcat-6.0.26/Catalina/
        blazeds/trunk/servers/apache-tomcat-6.0.26/localhost.keystore
        blazeds/trunk/servers/apache-tomcat-6.0.26/tomcat-users.xml.install

    Unless you are an Apple developer, the only way I know is to submit feedback via https://www.apple.com/feedback/itunesapp.html
    Here's the feedback I just submitted:
    Subject: Library organization bug in iTunes 12.0.1.26 for Windows x64
    I Have Feedback About: Software or Hardware Compatibility
    Comments:
    Hi,
    I have my iTunes library organized into subfolders (Music, Movies, TV Shows, and so on). When I add new video media to iTunes, either by "drag and drop," or placing a file into the "Automatically Add to iTunes" folder, the new media file is placed in the "Home Videos" folder. Then, after changing the metadata using the "Get Info" mechanism, the metadata is updated; however, the file is not moved out of the "Home Videos" folder. A new folder is created properly under "Movies" or "TV Shows" (depending on the type), yet iTunes isn't taking the final step of moving the file into that folder.
    I've validated this behavior on two different Windows systems.
    iTunes 12.0.1.26 running on OS X 10.10 (Yosemite) moves the files properly, so this issue looks to be specific to the Windows version.

  • Is my iPhoto library in the correct folder?

    iphoto 11-9.4.3
    Hello
    I was wondering if below was the correct location for my iPhoto library folder? if not , how do I correct it, if I can at all?
    I have no idea how it got renamed (iPhoto library copy) either, can that be corrected? if so how?
    the only noticeable issue I am having is it takes about 10-15 seconds for iPhoto to open and close.
    I wanted to back up my iPhoto library on a ext HD that is how i noticed this.(I probable did this on my last attempt to back it up)
    below is what is in my pictures folder.
    Thanks

    Old Toad, Terence Devlin, léonie,
    Thanks so much for your help,
    its backing up to time machine now (looks like it is doing a brand new back up, all 64 GB) and iPhoto opened up like it was untouched.
    It is great having people here that put in the time and effort to help out. I will follow you guys for future information.
    I forgot to ask, Should I bother changing the name of the "iPhoto library copy" back to iPhoto library?
    I thought I read somewhere in one of these iPhoto discussions never to change that name??
    CHEERS!

  • How do I save my files to the correct folder?

    When I try to save a file, it gives me the basic locations (desktop, documents, my files, idisk, etc., but if I want the file in a folder in documents, I can't get deep enough to highlight the file. It won't go farther than the documents folder. Is there a setting that I can change this? It is lame if I have to save a document to the desktop so I can find it, just to move it to the correct file that I want it in. Thanks for any help in advance.

    Next to the field in the Save window where you enter the file name, there's a little rounded box with a down-pointing arrow.  Click that to show a full file browser that lets you navigate the entire file system.

  • How to sign a pdf with the correct content

    how do I sign a pdf?  It says that Im not using the correct content.  And that my certificate is not valid???

    Garciaasgina which Adobe software or service is your inquiry in reference too?

  • How do I move a user's sparse image BACK into the correct folder

    Please help if you can!
    I accidentally moved the sparse image connected to my administrator account into the 'shared' folder. (I was trying to confirm shared settings between users, and inadvertently moved the file.) There were no error messages or warnings, the file moved easily into the shared folder.
    After it was moved, I was unable to login to that user's desktop, and the only explanation is "...because there was an error." The only thing I can think of is that it's because of the moved sparse image for that user.
    But, I can't move it back. The computer won't allow me to move the file, and when I try to copy it to the appropriate folder I get an error message that there is not enough disk space. I tried creating a new administrator account, but that didn't work. I've tried changing the file-sharing settings, but nothing I've thought of doing has worked. I've tried turning off Fire Vault for that user, but I can't seem to do it from a different user account.
    If you have any ideas of how I could log into this user account, I would be very, very grateful. It's my main desktop, and I need access to the files located there!
    Please help!!

    Dear jsd2 and William,
    Thank you both so much for your help. I cannot tell you how much I appreciate both of you taking the time to help me figure out this problem.
    William - The Library folder was basically empty. It had some Quicktime preferences in it, but nothing else. The Terminal didn't even recognize it, and I actually couldn't delete through Terminal, but simply sent it to the trash. Even so, I couldn't log in the user account.
    jsd2 - I was able to log in as root and had no problems opening the sparseimage. I then copied all of the data to an external HD. Once that was finished I verified the sparseimage mounted disk, but there were no problems found. Even so, I repaired disk, but still no problems found. Even so, I couldn't log into the user account. I did get to the point where it asked for the master FireVault password (by entering the wrong password 3 or 4 times). It accepted the master password, but then it wouldn't let me change the password and login (the master password only led me to a new-password screen).
    So, after verifying that ALL of my data was safely on the external HD (including music, pictures, mailboxes, files, etc...), I deleted the user account and home folder for the account I was locked out of. Then, I created a new account, and manually transfered the necessary files back into the user folder. Then, I restarted my computer and breathed a huge sigh of relief when my wallpaper came up on the screen. About 98% of my settings are in tact. All music, pictures, files, and e-mails survived. Although I have to re-ad the actual e-mail accounts, all of the other account settings are there.
    I will leave the copied files on the external HD for at least a few days or a week to make sure nothing important is missing, then I will set up Time Machine and start making regular backups.
    So, thank again, both of you, for your invaluable help, which led to a successful, if somewhat roundabout, solution to this problem.
    Also, jsd2, I don't remember if I turned Fire Vault off when I upgraded or not. It seems to me that the directions said I should, and in which case I would have - but the upgrade wasn't recent, so I don't really remember. (Or rather - clearly I didn't, if what you say is true.) At the moment, FireVault is off for all accounts on this computer. I want to turn it back on, but, to be honest, I'm really scared to now....Since I don't know what caused the problem in the first place, I'm leery that if the problem hasn't been fixed I might end up in the same situation again. Although I hadn't had any problems before today, and I know that I must have done something in the 'sharing' settings that created the problem.

  • Importing old pictures with wrong date stamp. After adjusting date they are landing in the correct folder of referenced masters.

    I was thrilled to learn that with Aperture I could have one big library and using referenced masters, I can organize the pictures by date so I know where everything is and can backup to the cloud.  I started importing really old photos that were taken with god knows what camera and the date is wrong.  Since I had all these in date structured folders I could make a best guess on the date - not needing it to be exact, just so it shows up close enough in projects and the original lands in the right folder for future use & backup. I have come to learn that changing the metadata is only referring to how Aperture sees it.  In other words, images that were taken on 10/31/04 are still landing in the referenced masters folder on the date the camera said.  I now understand that the metadata date is not the date Aperture needs fixed.  Is the best way to fix this to delete the images from Aperture, find some tool that will adjust to the approximate real date, then reimport.  If so, can someone recommend a utility that does this? If I can fix this inside of Aperture, even better.  I saw on one of the discussions: "it's all about the Exif and IPTC and not about the file metatata."  Please feel free to learn me on that.  Cheers.

    That answers some of it - the relocate files.  That will allow me to put the files in the right year/month folder.  I imported full folders into Aperture so need to edit the metadata date for multiple pictures at the same time.  I understand when you select multiple pictures and then ajust time, it adjusts in relation to the first picture.  In my case these things were taken by all sorts of crappy cameras & re-edited years later (2003 data).  So pictures taken on the same day have 2001, 2003 & 2007 dates. I really do just wnt to set all of them to the same (ballpark) date. 
    So my goals are:
    1) have the pictures land in the right referenced folder - answered
    2) do a mass adjust time to the same date for a folder of images
    3) have the projects then land chronologically inside Aperture - not sure about this one yet
    Thanks for your help, it's very much appreciated.

  • HT201269 itunes cannot see my iphone backup.  I have a backup of the backup on an external HD, but even tech support cannot figure this one out.  I copy and paste backups into the correct folder but itunes still does not see it.  All I need are my contact

    Sorry for short novel I am writing.  I just wanted to cover as much backround as possible.
    So, here it goes.  I backed up my iphone 4 after renting a movie.  The movie only played the starting credits before I was called on for daddy duty.  A few days later the movie would not play, so I restored my phone from my backup.  The movie would still would not play so itunes support refunded my purchase and ended my viewing privileges for that rental after verifying that I had not viewed the movie.  I then had a problem with my contacts showing up twice in the contacts list after the restore.  So I attempted another restore.  All was well at this point.  I then started having trouble with my pc and decided to copy the internal drive to an external source.  A week later I had a system failure and did a factory restore on my computer.  I re-installed itunes and tried to copy and paste the old backup into the new itunes.  Now itunes just flat out does not see the backup file (I failed to mention that I did a factory reset on the iphone after the last backup, hopping to start fresh).  Tech support had me uninstall and re-install itunes and then copy and paste the old backup into the newly installed itunes with no luck.  The files are all there, but itunes just doesn't see them (itunes says the device has not been backed up to the cloud or to the local machine).  We then tried backing up the factory restored iphone and replacing that restore file with one of my old backups on the external drive.  Ok, this is where it gets weird.  We replaced the guts of the folder but left the folder itself so itunes would continue to recognize the new backup folder with the old files.  Whoohoo, itunes now see's a backup folder full of old files, or so we thought.  The new files were deleted using shift delete so they would be gone for good and not mix with any files or folders.  When I restore my phone, it restores the files that were deleted from the restore file (pause here for a moment and imagine the stupid look on the face of tech support and I while we silently wonder how files that were permanently deleted were restored).  This left tech support and I both scratching our heads.  My service issue was escalated to the next level.  I waited for the phone call the next day that was scheduled at 10am to my wife's phone, but the call never came through.  As usual, apple disappoints again.  I just bought an iphone 5s and still have the iphone 4, and am looking for a solution to retrieve my contacts and restore to the 4 or 5s.  I am guessing that files in other folders must be associated with the iphone backup in order for itunes to retrieve the files.  Any ideas or support in retrieving my contacts would be greatly appreciated. 

    Sorry for short novel I am writing.  I just wanted to cover as much backround as possible.
    So, here it goes.  I backed up my iphone 4 after renting a movie.  The movie only played the starting credits before I was called on for daddy duty.  A few days later the movie would not play, so I restored my phone from my backup.  The movie would still would not play so itunes support refunded my purchase and ended my viewing privileges for that rental after verifying that I had not viewed the movie.  I then had a problem with my contacts showing up twice in the contacts list after the restore.  So I attempted another restore.  All was well at this point.  I then started having trouble with my pc and decided to copy the internal drive to an external source.  A week later I had a system failure and did a factory restore on my computer.  I re-installed itunes and tried to copy and paste the old backup into the new itunes.  Now itunes just flat out does not see the backup file (I failed to mention that I did a factory reset on the iphone after the last backup, hopping to start fresh).  Tech support had me uninstall and re-install itunes and then copy and paste the old backup into the newly installed itunes with no luck.  The files are all there, but itunes just doesn't see them (itunes says the device has not been backed up to the cloud or to the local machine).  We then tried backing up the factory restored iphone and replacing that restore file with one of my old backups on the external drive.  Ok, this is where it gets weird.  We replaced the guts of the folder but left the folder itself so itunes would continue to recognize the new backup folder with the old files.  Whoohoo, itunes now see's a backup folder full of old files, or so we thought.  The new files were deleted using shift delete so they would be gone for good and not mix with any files or folders.  When I restore my phone, it restores the files that were deleted from the restore file (pause here for a moment and imagine the stupid look on the face of tech support and I while we silently wonder how files that were permanently deleted were restored).  This left tech support and I both scratching our heads.  My service issue was escalated to the next level.  I waited for the phone call the next day that was scheduled at 10am to my wife's phone, but the call never came through.  As usual, apple disappoints again.  I just bought an iphone 5s and still have the iphone 4, and am looking for a solution to retrieve my contacts and restore to the 4 or 5s.  I am guessing that files in other folders must be associated with the iphone backup in order for itunes to retrieve the files.  Any ideas or support in retrieving my contacts would be greatly appreciated. 

  • A client has given me her old CS3 discs saying there are spare users on it. I've tried to run but the wizard cant find photoshop even when I browse to the correct folder.

    Could it be looking for an older version of photoshop than I have as it is looking for previous versions? I actually wanted to do a fairly lengthy trial of InDesign to see if I can get on with it and don't want to use the 30 day creative cloud trial as my broadband isn't up to it, and I will run the danger of losing work.
    I tried shortcutting to disc 2 which is the InDesign disc but it wouldn't accept the serial number from the back of the box as a valid InDesign serial number. I'm assuming that its not a shortcut I can take. Can someone tell me what I'm doing wrong here, or is it a simple case of the users/license not being deactivated properly. They are currently using CS5 in site so I guess its possible that they have upgraded all users on the license, but she didnt seem to think so. I'm not certain she knows exactly whats supposed to be done, and to be honest neither do I, so help would be great! Thanks very much

    Leofwinewulfhelm the Creative Suite serial numbers can only be used with the Creative Suite installers.  If you invoke the separate installer for InDesign on Disc 2 then your serial number will not be accepted.
    Please try installing using Disc 1 and running the installer from there.  You can then choose to only install InDesign if that is what you wish.
    Finally you can verify if the serial numbers for CS5 is an upgrade serial number or not by viewing the serial number under your account.  Please see Find your serial number quickly - http://helpx.adobe.com/x-productkb/global/find-serial-number.html for information on how to locate your serial number.  If Creative Suite 5 is an upgrade then it is likely it was upgraded from Creative Suite 3.  This would mean that the Creative Suite 3 license is now being utilized to allow the running of Creative Suite 5.

  • Sync Errors - What Are the Correct Folder Permissions?

    I've been having problems recently on the PB getting it to successfully sync.
    Decided to open the log using Console and see what was happening - all sorts of errors! One seems to relate to permissions, the other to a possible problem at .Mac
    It had attempted to create a folder 'Syndication' under '~/Library/Application Support' and couldn't. What should the group be to get this to work properly - clearly it isn't 'staff'!
    In the other one it seems that a http 404 error occurs (not found) when trying to retrieve keychains from .Mac - going to keep an eye on this.
    Cheers
    Powermac G5 DP 2.3 GHz   Mac OS X (10.4.4)   4.5 GByte RAM

    .Mac sync got a lot of problems this week and Apple has disabled it for now. Check www.mac.com and I think you should follow .Mac forum instead of iSync one as this is a .Mac problem (iSync does not handle .Mac sync). People are discussing the issues you experience there.

Maybe you are looking for