Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,174
    Thanks
    19
    Thanked 66 Times in 65 Posts

    Invalid procedure call or argument: 'mid'

    Code:
    names = mid(names, 0, len(names)-2)
    names = fldQuantity, fldSize, fldProductID,
    len(names)-2) returns 34
    but I get: Invalid procedure call or argument: 'mid'

  • #2
    Regular Coder
    Join Date
    May 2005
    Location
    Michigan, USA
    Posts
    566
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You have another variable on the page using mid... I usually get caught on it when getting a menu ID... which i usualy call mID in the db... so i call it as that on the page and all hell breaks loose...
    Note: I do not test code. I just write it off the top of my head. There might be bugs in it! But if any thing I gave you the overall theory of what you need to accomplish. Also there are plenty of other ways to accomplish this same thing. I just gave one example of it. Other ways might be faster and more efficient.

  • #3
    Regular Coder
    Join Date
    Sep 2004
    Posts
    152
    Thanks
    0
    Thanked 0 Times in 0 Posts
    @NancyJ
    I am assuming you want names without the last two characters. If so, you can do either of the two:

    1) names = left(names, len(names)-2)
    or
    2) names = mid(names, 1, len(names)-2)

    If you are using the mid function and you set the start position to 0, it will error out with the error you posted.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •