Results 1 to 6 of 6
  1. #1
    access321 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2014
    Posts
    8

    Access 2010: issue with Control source and #Name error

    Hi



    I am trying to use a count function copied from a query ( Number of spares - SafeCaptureHDs ) into an unbound text in an Access 2010 form:

    Control source entry via the Data tab ( Property sheet ) :

    =[Number of spares - SafeCaptureHDs]![CountOfBox Type]

    I receive a '#Name' error when I open the form.

    Do I need to change some properties in the Property sheet?

  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
    If you're saying that query is not the record source of the form, you'd have to use DLookup() or some other method to get the value.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    access321 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2014
    Posts
    8

    Access 2010: issue with Control source and #Name error'

    Quote Originally Posted by pbaldy View Post
    If you're saying that query is not the record source of the form, you'd have to use DLookup() or some other method to get the value.
    Thanks for getting back to me.

    I haven;t used dlookup in Access before, please would you show me how i would go about doing that.

  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
    =DLookup("[CountOfBox Type]", "[Number of spares - SafeCaptureHDs]")

    You'll find in the long run that the spaces and symbols in your names aren't worth it.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    access321 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2014
    Posts
    8
    Quote Originally Posted by pbaldy View Post
    =DLookup("[CountOfBox Type]", "[Number of spares - SafeCaptureHDs]")

    You'll find in the long run that the spaces and symbols in your names aren't worth it.
    Thanks, Paul.

  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
    No problem, and welcome to the site by the way!
    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. #Name error on Report's Control Source
    By gaker10 in forum Reports
    Replies: 1
    Last Post: 11-14-2014, 10:43 AM
  2. SQL Query and Form Control Source Issue
    By dhogan444 in forum Forms
    Replies: 5
    Last Post: 08-07-2012, 07:58 AM
  3. Control Source Error ?
    By bellevue in forum Forms
    Replies: 8
    Last Post: 06-02-2012, 12:47 PM
  4. Text Box Control Source Issue
    By timbit6002 in forum Forms
    Replies: 8
    Last Post: 03-01-2012, 02:03 PM
  5. Replies: 5
    Last Post: 10-13-2011, 03:36 PM

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