Results 1 to 2 of 2
  1. #1
    TWD is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    7

    Problems Using a Saved Query as a Control Source

    Hey guys,



    This is my first attempt at refering a query for a control source on a text box.

    I created a simple select query that has a sum function field to give me a grand total. I want to display this total on my report.

    I added a text box and selected my query as the control source. It saved with no errors. However, when I run the report, no data is displayed. When I return to the design, the control source is blank again.

    What am I missing here? The text box does say unbound which I'm not sure what that means. Pretty green here. lol Can anyone help?

  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,521
    You can't have a query as the control source. It can be a field from the form's record source, or a calculated value. From the sound of it, your simplest solution is a control source of:

    =DLookup("FieldName", "QueryName")

    or you could dump the query and use a DSum().
    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: 5
    Last Post: 10-13-2011, 03:36 PM
  2. Dlookup as Control Source
    By alsoto in forum Forms
    Replies: 1
    Last Post: 08-28-2011, 07:05 PM
  3. Replies: 2
    Last Post: 04-15-2011, 01:13 PM
  4. control source
    By nashr1928 in forum Forms
    Replies: 5
    Last Post: 03-12-2011, 09:31 PM
  5. Control Source
    By sarah54 in forum Access
    Replies: 1
    Last Post: 03-07-2011, 09:00 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