Results 1 to 6 of 6
  1. #1
    tstoneami is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    71

    Cannot use trim - Control has a reference to itself

    I have a several text fields in a table which I can successfully use the =Trim function on. I have a number of others in the same table of the exact same type and size - no differences that I can detect - where I get a "control has a reference to itself". If I preview the report, I see a #Type! entry in the output.



    I've looked around quite a bit and can't find a relevant reason, although I am sure it will be obvious to more experienced folk around here.

    Any insight immensely appreciated. FYI if I don't use Trim, the interface is happy and the report runs - just not with trimmed results.

    Thank you - eagerly waiting...

    Troy

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Likely the textbox has the same name as the field, which can confuse Access.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    tstoneami is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    71
    Bingo. Of all the things I exhaustively looked at, the most obvious was overlooked. THANK YOU PBALDY!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    No problem! That's a pet peeve of mine. The wizards all name controls that way, then if you do anything different, the program barfs. Doesn't seem like it would be difficult for the wizards to use a naming convention of some sort that would avoid the issue.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    tstoneami is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    71
    How do we mark these as solved? Is that important to do that? I have another thread that is solved also.

    Again, thanks -

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Marking as solved can be helpful. It's under Thread Tools at the top of the thread.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 03-19-2012, 12:56 PM
  2. Replies: 1
    Last Post: 05-12-2011, 02:25 PM
  3. Control Reference on a Form
    By gmitchell@exbrief.com in forum Forms
    Replies: 5
    Last Post: 01-24-2011, 12:31 PM
  4. Variable within form control reference
    By Tyork in forum Programming
    Replies: 2
    Last Post: 10-13-2010, 09:55 AM
  5. Can't reference control in subform
    By evanscamman in forum Forms
    Replies: 0
    Last Post: 12-25-2007, 06:47 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums