Results 1 to 5 of 5
  1. #1
    Heatshiver is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2011
    Posts
    128

    Question Call a Field created from a Query?

    I want to call a field from query that is self-contained in a report. How do I do this?



    Beyond this, is there any performance difference between creating a query and having a self-contained query?

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    A couple of questions:
    1. Can you explain what you mean by 'call a field from a query'?
    2. What do you mean by 'a self-contained query'?

  3. #3
    Heatshiver is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2011
    Posts
    128
    Hi Robeen,

    1. If I need to use a field I created in a query in a different form/report. How do I go about using it? Do I need to use an expression somehow, VBA functions, etc.?

    2. Instead of creating a query that shows up on the side panel, I create a query within the report that never shows up on the side panel. I was actually unaware this was possible until a few days ago.

  4. #4
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    The query that you have within the report:
    1. Where is the query typed in? Can you give me the exact text of the query?
    2. Where does the data it retrieves show up? Is it in a field on the report?

    If you want to use the same query in a different report - you can just copy the sql and link it to the field the way it is in the existing report - no?

  5. #5
    Heatshiver is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2011
    Posts
    128
    1. The query is in the report. When you open the report and click the "..." for the Control Source, the query-builder appears. However, if you Close the query-builder before saving, it will ask if you want to Save. You have the option to save the query as a query that will appear on the control panel, or to be self-contained in the report only.

    The created field in the query is:

    Multiplication: [Field1]*[Field2]

    2. The data appears on the Report. However, the field I created does not, as it is actually just a part of an expression for a textbox.

    I don't want to use the same query in a different report, but I suppose I can create the same field and reuse it if necessary. I just thought there would be a way to call up a created field from a query.

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

Similar Threads

  1. Replies: 3
    Last Post: 11-07-2011, 10:41 AM
  2. Help Writing VBA and call to query
    By brianb in forum Programming
    Replies: 7
    Last Post: 03-09-2011, 09:42 AM
  3. Code to display latest record number field created?
    By rowardHoark in forum Programming
    Replies: 1
    Last Post: 01-31-2011, 08:03 AM
  4. Create a variable from a query created in VBA
    By kaelcarp in forum Programming
    Replies: 4
    Last Post: 06-11-2010, 09:13 PM
  5. New Field Name on Newly created query
    By inan25 in forum Queries
    Replies: 3
    Last Post: 05-13-2009, 09:05 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