Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Trim function in Query (2003 SP 3)

    I recently installed a new hard drive and loaded Windows Vista Business. After loading all the updates, I loaded Office 2003, and Access 2003, and then all the updates for those tools. When I try running a query using "Trim()" function I get the following error:

    The function you entered can't be used in this expression
    * You may have used a DoEvents, LBound, UBound, Spc, or Tab function in an expression
    * You may have used an aggregate function, such as Count, in a design grid or in a calculated control or field.

    This query has run fine for years. For testing purposes, I tried entering "Trim(" one ") in the field of a new query, and I get the same message when I tab out of the field. To eliminate the possiblity of making a typo of having a hidden character, I use the "Build" tool within the query and selected the Trim function, and obtained the same results.

    Is this a Vista thing or an ID 10 T thing?

    Thanks,

    Ken


    Any ideas on where to look for a solution?

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

    Re: Trim function in Query (2003 SP 3)

    Try the following:
    - Press Alt+F11 to activate the Visual Basic Editor.
    - Select Tools | References...
    - If any of the selected (ticked) references start with MISSING, note which ones they are, then clear their check boxes, and finally click OK.
    - Now try Trim again in an expression in a query.

  3. #3
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: Trim function in Query (2003 SP 3)

    hans,

    Thanks. Although there were none missing, I did change from "Microsoft ActiveX Data Objects 2.7 Library" to "Microsoft ActiveX Data Objects 2.8 Library" to see if it made a difference. It did. Not sure why this occurred though. Do you think it was something involved in reloading Office/Access?

    Thanks again!

    Ken

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

    Re: Trim function in Query (2003 SP 3)

    I guess that changing the reference forced VBA to refresh all entry points.

Posting Permissions

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