Results 1 to 2 of 2
  1. #1
    sordfish555 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2013
    Posts
    1

    Post Newbie Query

    Hi Guys,

    I was hoping one of you gurus could give me some advice. I have set up a basic database that has a customer table , orders table , join table and products table. I have created an invoice form that has customer details and then in a subform has the order ID and product ID , name , price and quantity.



    I have a text box on the form to which I am trying to output the sub total to when the form is launched(quantity X price for the current order).

    I was trying to create a query that will return the subtotal for an order.I had the query calculating the subtotal but I was then trying to get t the cost based on the order ID. I was then attempting to get the Order ID for the query from the open form by adding this to the criteria in the query:

    [Forms]![Invoice]![invoicesubform].[Form]![Order ID]

    I was then trying to use Dlookup to put the result of the query into a subtotal text box by using:

    =DLookup("[cost colum from query entered here]",[the query name was entered here]")

    Apologies if I am way off track here Am I doing this completely wrong or is there a better way to do this?Any advice would be greatly appreciated.

    best wishes
    Mark

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,913
    A report may be better vehicle for this manipulation and output of data. Use report Grouping & Sorting features with aggregate calcs in group footers for subtotals and totals. This will allow display of detail info and summary calcs.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. newbie needs dynamic query created in access 2010
    By hairlesshippy in forum Queries
    Replies: 1
    Last Post: 09-10-2012, 08:55 AM
  2. Access Newbie - Query for Daily Subtotals?
    By malikastor in forum Access
    Replies: 3
    Last Post: 01-09-2012, 09:11 PM
  3. Newbie Need Guide and advise on Query
    By sabrish72 in forum Access
    Replies: 3
    Last Post: 05-24-2011, 08:44 PM
  4. Newbie Help with Access Query
    By MartyMojito in forum Access
    Replies: 1
    Last Post: 03-17-2011, 02:50 PM
  5. Newbie has a Query Question
    By Bruce in forum Queries
    Replies: 2
    Last Post: 11-20-2009, 10:38 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