Results 1 to 4 of 4
  1. #1
    Larry in TN is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2015
    Location
    Nashville, TN
    Posts
    9

    Displaying Data from Query on Form

    I'm new to Access but have been using Excel since 1990. I'm working on a "simple" project as a way to learn Access.



    I have Access 2016 for Dummies and haven't been able to find the answer to this question in the book. (So far, it doesn't seem that helpful as a reference for looking stuff up)

    I have a Table with my data and a Query that calculates some sums from the data. How do I display the results of the Query in controls on a Form?

    If tried using a Text Box with Control Source "
    =[qryQuery]![FieldName]" but the result is "#Name?".

    I can't figure out the correct syntax for references the Query data (or I've left something else out somewhere?).

    Thanks,

    Larry

  2. #2
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    All you need to do is make the query the record source for the form. All fields from the query are then available as sources for the form controls.

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    How do I display the results of the Query in controls on a Form?
    Under the Design Tab within the Ribbon, create a new form via "Form Design". In the Property Sheet (by default it should be to the left), you can assign values to the Record Source of the From. The Recorsource property is located under the Data tab within the Property Sheet.

    Use the pulldown to select your Query Object's name. With your query as the Form's recordsource, you can add controls to your form's design surface that are bound to the Query. Use the "Add Existing Fields" tool under the Design Tab from within the Ribbon to add bound controls to your form.

    If tried using a Text Box with Control Source "=[qryQuery]![FieldName]" but the result is "#Name?".
    Practice with bound controls and then you can substitute an expression for a Recordsource's field name.

  4. #4
    Larry in TN is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2015
    Location
    Nashville, TN
    Posts
    9
    Thanks for the replies. I don't fully understand how that'll work out but I think you have me pointed in the right direction! I'll give it a try over the next day or two and see how far I get.

    Thanks again!

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

Similar Threads

  1. Replies: 10
    Last Post: 10-14-2013, 10:18 AM
  2. Replies: 2
    Last Post: 11-19-2012, 10:54 AM
  3. Report not displaying query data
    By compooper in forum Reports
    Replies: 4
    Last Post: 07-26-2011, 02:04 PM
  4. Replies: 1
    Last Post: 11-12-2010, 06:33 PM
  5. Displaying unrelated data on a form
    By FadingAPE in forum Forms
    Replies: 1
    Last Post: 10-06-2010, 10:33 AM

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