Results 1 to 9 of 9
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Missing Operator (Access 2002)

    Hi

    Can someone tell me the missing operator here please.

    Expr1: DLookUp("Post Code","SFE InDirectNIV","sold to party=1280582")

    Many Thanks Braddy
    If you are a fool at forty, you will always be a fool

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Missing Operator (Access 2002)

    Apparently, you have a field named 'sold to party'. Since the field name contains spaces, Access gets confused over the expression

    "sold to party=1280582"

    The best solution is never to use spaces in the names of fields and of database objects. If that is not possible, you must use square brackets around names that include spaces:

    "[sold to party]=1280582"

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Missing Operator (Access 2002)

    Hi Hans

    Thanks for the advice, about field names, I did not create this database, but I will remember this for the future, as this is the first query in this database, would it be feasable for me to change the field names and remove spaces?.

    Thanks
    Braddy

    NB the [ ] worked fine.
    If you are a fool at forty, you will always be a fool

  4. #4
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Missing Operator (Access 2002)

    Braddy

    I hope you don't mind me stepping in here after this question is answered but I thought I would give you a "Jerry Top Tip"

    I always try and teach my students not to put spaces in their field names. So:

    Post Code becomes PostCode
    sold to party becomes SoldToParty

    I personally always capitalise the new word to allow me to recoginise the new word eg LastName, FirstName
    It was drilled into me at a very early stage so that as I advanced into SQL and coding it would not cause issues with the spaces.

    My apologies if I have stuck my nose in where it is not wanted
    Jerry

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Missing Operator (Access 2002)

    That's sound advice.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Missing Operator (Access 2002)

    If possible, it would be a good idea to change the names the way Jezza suggests. It will make working with the database a lot easier in the future.

  7. #7
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Missing Operator (Access 2002)

    There are a few more Tips N'Tricks <!post=here,195604>here<!/post>.
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  8. #8
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Missing Operator (Access 2002)

    Hi Jezza

    Please do not apoligise This is very useful info for me as I am just starting in Access, ( Although I am 65 Years old), but I am trying to maintain my employment.

    Many Thanks

    Braddy
    If you are a fool at forty, you will always be a fool

  9. #9
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Missing Operator (Access 2002)

    Nice list Steve <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    Jerry

Posting Permissions

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