Search results

  1. JMongi

    New to Powershell - Here's what I have so far

    It's a little more involved. Here are a couple of posts from Stack Overflow.
  2. JMongi

    New to Powershell - Here's what I have so far

    @Isaac - Thanks everyone! Glad everyone found it useful. It probably would have gone quicker with a proper dev environment rather than just running the script and seeing what errors I received. I was using Notepad++ but could have used some catches on basic syntax. I did pick up the syntax...
  3. JMongi

    New to Powershell - Here's what I have so far

    Well, Symlinks wasn't necessarily needed anyway. I convinced myself they were "better" than Windows shortcuts. In practical terms, they function similarly and Symlinks are really designed to faciliate cross-compatabilty with Unix NFTS systems. So, I redid the script with shortcut instead...
  4. JMongi

    New to Powershell - Here's what I have so far

    Ok. Well, I "kind of" sorted the problem. It occurred to me that these locations are on our file server which I DON'T have admin rights to (though I do have full regular privileges). Once I did a test with a local directory it worked without error. Now, I have to figure out if there's any...
  5. JMongi

    New to Powershell - Here's what I have so far

    I checked for existing sym links (I had been testing this script for awhile and thought maybe it had been creating them this whole time), but it did not find any. One issue has been resolved. I thought I had a higher version of PS installed, but I currently have PS 5.1. So, I did some...
  6. JMongi

    New to Powershell - Here's what I have so far

    I saw a thread where the error I get (which is a terribly unhelpful error report) can be caused by trying to create a sym link where one already exists. So, I'm trying to see how I can view existing sym links. I placed a dummy text file in the target location and the link isn't active anyway...
  7. JMongi

    New to Powershell - Here's what I have so far

    @theDBguy and anyone else, Ok.....almost there..... Here is the latest script. Everything seems to work EXCEPT for creating the symbolic link (I am testing this in PS with admin). I've tried a few different formats based on MS documentation and sample snippets from other websites. Can't get...
  8. JMongi

    New to Powershell - Here's what I have so far

    So, how does powershell work. I'm launching my script within PS and getting errors. But, the cited errors occur after the first sections of code but I don't get any of the message box popups. Does PS "compile" or something like that on run and then execute? Here is the latest version of the...
  9. JMongi

    New to Powershell - Here's what I have so far

    Well, I thought I had a start, but this doesn't actually do anything...LOL! Any thoughts? Am I starting this correctly? I'm running the .ps1 file in powershell. Should I be calling the file differently? Add-Type -AssemblyName Microsoft.VisualBasic $title = 'Unit Number as XX-XXXX' $msg =...
  10. JMongi

    PowerShell!

    Is there a specific need to convert it to native PS? I'm not an expert by any stretch, but I definitely read something a few weeks/months ago that is basically using powershell to launch a vbscript. The idea being specifically to avoid rewriting large, complex, stable scripts.
  11. JMongi

    New to Powershell - Here's what I have so far

    That's a great reference, thanks! It turns out that what I really want is a symbolic link. The folder will appear to be in the directory structure but will actually be located in a separate structure with separate permissions. Interesting stuff I didn't even know that I could set up.
  12. JMongi

    New to Powershell - Here's what I have so far

    Dipping my toe into the powershell arena. I know some basic programming (formal training in Pascal and QBasic) and what I've picked up of VBA from Excel and Access. So, I can't say that I know any particular scripting language so I thought I would jump into powershell instead of learning...
  13. JMongi

    .MoveNext not working

    You don't appear to be strange! :) The code is strange. Also, it's a faux pas to post an edited version of your code. The fine folks here that are more skilled than I need to see every line of code in order to help. As soon as you start pruning before posting, you inevitably prune something...
  14. JMongi

    .MoveNext not working

    Honestly, this whole code block seems strange. Stuff is in the wrong place or the wrong order like the .movelast and .movefirst coming after you try to set the recordcount. You have detailed error handling but no On Error in the appropriate place. You have an If/Then code block checking a...
  15. JMongi

    .MoveNext not working

    Which it cannot do if it is wrong, can it? That's why you need to verify with a debug.print what it is. Set a breakpoint. That will automatically engage the debugger when the code is running. Then pressing F8 will execute the next line of code. Press F8 again to execute next line and so...
  16. JMongi

    .MoveNext not working

    The fact that it writes the contact twice indicates there is a larger problem as it appears this code has a mechanism that is supposed to prevent duplicate contacts from being created and yet it does. As @Gasman is saying, set a breakpoint in your code and step through the code (using F8) and...
  17. JMongi

    .MoveNext not working

    Your indented post doesn't seem to follow indenting protocol. For example your first With statement is on the same level as the If statement it is contained within. Here is my super quick indentation of your code (could be errors). Dim MyDB As Database, rs As Recordset Dim CustomerID As Long...
  18. JMongi

    .MoveNext not working

    1. Please use code tags 2. I would increase your test record set to be > 2 if you are wanting to test looping
  19. JMongi

    Next Available Number that includes missing gap numbers

    Indeed it should! Preaching to the choir here :)
  20. JMongi

    Next Available Number that includes missing gap numbers

    @theDBguy - Thanks for the added detail! @arnelgp - You underestimate our lack of any business procedures. There is no list. 🤯😱 We didn't even have a drawing number standard before I started. @The_Doc_Man - Good advice. Believe me, I'm not stressing out about it. The only real thing I'm worried...
Back
Top Bottom