Results 1 to 2 of 2
  1. #1
    4 Star Lounger access-mdb's Avatar
    Join Date
    Dec 2009
    Location
    Oxfordshire, UK
    Posts
    555
    Thanks
    51
    Thanked 42 Times in 39 Posts

    Update query not working

    This has probably got a very simple answer, but it's driving me round the bend.
    I want to update a field which contains a filename (directory and filename) where the filename has spaces. I want to remove the spaces. The filenames are of the form:
    C:\Users\Pictures\C Olympus slides\Cx.jpg (where x is a 4 character number).
    I tried using an update query, with a new field to receive the new data (so I don't screw up the original filed) of the form

    left([scanname],26) + "C_Olympus_slides" + mid([scanname],43).

    But when I hit enter, it just comes up with "There was an error compiling this function - the Visual Basic module contains a syntax error. Check the code and recompile it". I am convinced I've done this sort of thing before and have a similar query on another table which doesn't have the error. Please help an old man from thinking he's completely lost his marbles.

    Many thanks

    Malcolm

    Oops, its Access 2003

  2. #2
    4 Star Lounger access-mdb's Avatar
    Join Date
    Dec 2009
    Location
    Oxfordshire, UK
    Posts
    555
    Thanks
    51
    Thanked 42 Times in 39 Posts
    Well, I shut down the database, went away and tidied up the pets in the garden, then came back and tried with a different database (just a left function) and it worked. Went back to my original database - and guess what? It worked this time. So I'm not losing my marbles, but I have no idea why it decided to cause me grief (software doesn't deliberately cause grief to people does it?). I'm sure I restarted the database - perhaps I didn't (that much is down to age!).

Posting Permissions

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