Search results

  1. nhorton79

    Select as you type ListBox

    Hi All, Thanks for your quick responses. I've attached a screenshot showing what the form looks like. There is a large listbox showing all projects/jobs within a certain status. Users usually click anywhere on the listbox and start typing. At the moment they can only get to the first letter...
  2. nhorton79

    Select as you type ListBox

    Hi All, I have a listbox (lstJobs) on a form (frmJobStatusList) which contains a large list of jobs. Users can double click on the listbox to open a job form which contains details about the job. Currently when the listbox is selected people can type a character which takes them to the first...
  3. nhorton79

    Code to untick box on exit

    My thought would be put the code on the subforms cancel button on_click event. Would be something like: Forms!Mainform!ControlName = False DoCmd.Close acForm, Mainform DoCmd.Close acForm, Me.Name Without knowing exactly how your forms are handled on close, field names and form names it’s a...
  4. nhorton79

    Access Form Convert to PDF VBA Code not working

    Hi Mackbear, You should still be able to save it to a desktop folder. I wouldn’t have thought that a different case letter would stop it from being able to save to that folder. So definitely try Gasman’s recommendation to debug.print or msgbox the fldrPath variable might help you identify the...
  5. nhorton79

    Dlookup with filepath as criteria

    Hi Colin, I’ve had no issues with the spaces, just Gasman. My issue was with the backslashes and found that if I replaced with a double slash it worked, kind of like in c# (“\\” or @“\”) Sent from my iPhone using Tapatalk
  6. nhorton79

    Dlookup with filepath as criteria

    Hey Gasman. That is weird. Especially with the spaces on yours. I have had no problems with spaces at all. Sent from my iPhone using Tapatalk
  7. nhorton79

    Dlookup with filepath as criteria

    So what I did was created a tempFile variable rather than overwriting my File object variable. Then I used: tempFile = Replace(File, "\", "\\") ' replace single backslash with double slashes Now getting my primary key back...Perfect! Thanks Gasman and all for helping out. I think it was...
  8. nhorton79

    Dlookup with filepath as criteria

    Sorted it!!!! When I run ?DLookup("[QuotationID]", "tblQuotation", "[QuotationDescription] = 'Quote\\rev1'") I get the correct result. A double slash to escape!
  9. nhorton79

    Dlookup with filepath as criteria

    Okay. Been doing some tests in the immediate window using another field in the same table. I have a field in there called QuotationDescription and the first record has a value of "Quote rev1" When I type in: ?DLookup("[QuotationID]", "tblQuotation", "[QuotationDescription] = 'Quote rev1'") I...
  10. nhorton79

    Dlookup with filepath as criteria

    There can often be multiple quotes/pdfs in each job/project folder, as we often provide multiple variations on a single project. Each one is linked back to the job through a field called JobID_FK. Hence, why I need to move them individually.
  11. nhorton79

    Dlookup with filepath as criteria

    Here is my entire code block: Please be kind, I haven't had time to refactor, just trying to get a working concept first: Option Compare Database Option Explicit Public Sub MoveQuotations() Dim FileSystem As Object Dim HostFolder As String Dim Folder Dim SubFolder HostFolder =...
  12. nhorton79

    Dlookup with filepath as criteria

    The O drive is a network drive. The code I have which saves the files (reports saved to PDF) in the folders works, along with all other code which references the network drive as "O:"
  13. nhorton79

    Dlookup with filepath as criteria

    Hi guys, Had to create a file, as the For loop runs through the actual folders, so needed it to pickup a file that had no spaces so that it could compare it to the table. Still no joy... Have definitely debugged the strCriteria
  14. nhorton79

    Dlookup with filepath as criteria

    Isladogs, will have to make a copy of a PDF in one of the folders and create a dummy record in the table to test this. Bear with me.
  15. nhorton79

    Dlookup with filepath as criteria

    Hi NauticalGent, Have just tried: intQuote = Nz(DLookup("[QuotationID]", "tblQuotation", "[QuotationLocation] = 'O:\SignNET\JobRelated\31689\20170208 Palmer Equestrian.pdf'"), 0) Still getting a NULL (0) return value for intQuote
  16. nhorton79

    Dlookup with filepath as criteria

    Will definitely have to convert to long eventually. Which is on my list of todos. Have tried this as a long too though but still doesn’t work. Sent from my iPhone using Tapatalk
  17. nhorton79

    Dlookup with filepath as criteria

    Hi Arnel, Have tried that but still getting NULL (0) from the Dlookup Sent from my iPhone using Tapatalk
  18. nhorton79

    Dlookup with filepath as criteria

    Hi All, I've changed the way we store our quotations in our quoting database. Where before we would store them under the project number, we are now going to sore them under the client name first and then have a subfolder for the various projects. In order to move over all the old quotations...
  19. nhorton79

    How to redirect to another report from a Message Box

    You can rename the buttons (with length restriction of course, don’t want massive buttons) and then you an If statement to catch the button pressed ie. If intButton = vbButton1 Then ‘Vba code to open report Else ‘Other code here End If Sent from my iPhone using Tapatalk
  20. nhorton79

    How to redirect to another report from a Message Box

    Try Enhanced Msgbox, I use it for all my msgbox in my projects. http://blog.nkadesign.com/2008/05/20/ms-access-enhanced-message-box-replacement/ Sent from my iPhone using Tapatalk
Back
Top Bottom