Search results

  1. ironfelix717

    Dimensioning as a Report - Type mismatch

    Greetings, I am attempting to access vba defined report properties for a specific report. Dev hut has a good article on setting the object to allow intellisense here: https://www.devhut.net/vba-programming-a-form-or-report-with-intellisense/ While intellisense will work after dimensioning as...
  2. ironfelix717

    Solved Access VBA - Escaping special characters in SQL String criteria.

    I was hoping it was that simple all along. I had my "order of operations" incorrect in my test file so the solutions were not being applied to the final result, and i was consistently getting an error. Dumb mistake. Thanks
  3. ironfelix717

    Escaping CHR(39) in Query strings

    Updated with a reply. I was incorrect again as a result of the original code error. Special characters (at least the "." character) has no effect on the syntax and works successfully. Apologies for confusion! Regards
  4. ironfelix717

    Solved Access VBA - Escaping special characters in SQL String criteria.

    Hi @cheekybuddha I stand corrected. The dot character will not fail the code. This was a confusion with a code error I had, as described in the previous post regarding escaping CHR(39) Thanks, sorry for confusion. Regards
  5. ironfelix717

    Escaping CHR(39) in Query strings

    Not entirely true - See my latest post requesting help on escaping speciality characters in Access SQL. My most joyous pass-time is figuring out how to escape a 'dot' operator in the string.
  6. ironfelix717

    Escaping CHR(39) in Query strings

    Double quotes are not an issue for a SQL string, apparently as I've learned. If by double quote you mean two instances of chr(34) or even one instance of chr(34). criteria = "hello""world" SQL = "SELECT * FROM MyTable WHERE ID = '" & criteria & "';" The above will pass all day. As well as...
  7. ironfelix717

    Escaping CHR(39) in Query strings

    Hi, The solution has been provided by @arnelgp However, I now discovered my original attempt was correct and would work, and I wrongly thought it was flawed due to some incorrect code. Which also renders my last reply regarding the difference between @arnelgp's solution and mine erroneous...
  8. ironfelix717

    Solved Access VBA - Escaping special characters in SQL String criteria.

    Back again. How does one escape special characters, especially the . period/dot operator inside a criteria string? Topics that exists on this discusses enclosing them with brackets "[ ]". That would be a wonderful solution... but lo and behold that would be far to simple to work in Access, as...
  9. ironfelix717

    Escaping CHR(39) in Query strings

    I see whats going on there and its the most un-natural and unintuitive thing I can imagine. Everything I know about strings is now useless. The following statement should be universally true. myvar = chr(39) myvar2 = "'" "'" = chr(39) = myvar = myvar2 What we've just demonstrated is that the...
  10. ironfelix717

    Escaping CHR(39) in Query strings

    Thanks for showing a simple example of this. I haven't got into using parameters yet, which from what I understand is the 'proper' way of handling criteria, especially for preventing SQL injection. However, I need a string-based solution, as that solution has way too much overhead. This...
  11. ironfelix717

    Escaping CHR(39) in Query strings

    Unsurprised, yet again, that escaping quote characters in strings is profoundly difficult. I am trying to escape the glorious apostrophe, aka chr(39). Usage: Sub test() Dim Criteria As String Dim SQL As String Criteria = "Mc'Hammer" SQL = "SELECT * FROM...
  12. ironfelix717

    (DQB) Dynamic Query Builder - Dynamically build VBA queries fast

    Dynamically building unbound queries in VBA (dynamic meaning on-the-fly) can be a daunting task. A common application of this is building search forms. First, all criteria-related controls (inputs) must be built (i.e. search textbox, some checkboxes, etc.), and then tied to the backend, which...
  13. ironfelix717

    Solved CMD String executes in CMD, but not in VBA.Shell

    Update: After several hours of mashing on the keyboard, I solved a multitude of problems to achieve the end result I desired. '------------------------------------------------ In regards to the specific OP question: @sonic8 pointed me in the right direction. I can't pipe directly from the...
  14. ironfelix717

    Solved CMD String executes in CMD, but not in VBA.Shell

    Update: Still unsure why the VBA Shell function has difficulty with this, and the CMD Prompt interface doesn't. The issue is that the pipe command > "C:\Users\Dev\log.txt" is being treated as an argument to the executable C:\Users\Dev\Scripts\Script.exe, and not a pipe to the output. So...
  15. ironfelix717

    Solved CMD String executes in CMD, but not in VBA.Shell

    I am trying to pipe the output of a shell command.... Here is a verbatim CMD string that I can copy and paste directly into CMD prompt and execute with success. C:\Users\Dev\Scripts\Script.exe "C:\Users\Dev\input.pdf" "C:\Users\Dev\output.pdf" 256 > "C:\Users\Dev\log.txt" In VBA, this same...
  16. ironfelix717

    VBA - Get Win Explorer file previews

    Updating to include another interesting link: https://stackoverflow.com/questions/5206777/document-previews-with-windows-api-code-pack Further reinforcing it's da*n near impossible to get these previews right from the shell. Will update if I find any solutions.
  17. ironfelix717

    VBA - Get Win Explorer file previews

    Great information. I saw the API code pack but its basically over my head as to how to actually leverage it... I was able to play around with what little information exists out there for "generating thumbnails" or.. "Generating file previews."... I found some C#.Net code (still cannot find...
  18. ironfelix717

    VBA - Get Win Explorer file previews

    Hi, I had a look at this example by @arnelgp - which includes the reg file to allow office files to open in the control. https://www.access-programmers.co.uk/forums/threads/generic-office-document-viewer.297837/ Yes, the web browser control does a decent job at previewing a variety of...
  19. ironfelix717

    VBA - Get Win Explorer file previews

    Greetings all, This topic is a long shot and well beyond my skill at the current time-- but a long shot that's worth shooting, as I know how deep the knowledge and experience runs on this forum. Preface: I have a custom file manager form that has a "preview" image control... pretty standard...
  20. ironfelix717

    Solved Access VBA - Loop through files in Folders, Subfolders, Sub-Sub Folders....

    Hi, Thanks for your reply @theDBguy Your tool worked good for me when I tested your specific application. But converting the code to my project was unsuccessful. Maybe its my implementation at the caller level. I like your design as it returns strings instead of a collection of objects...
Back
Top Bottom