Results 1 to 10 of 10

Help with Query to get Specific datauery to only display data for a specific InvoiceID

  1. #1
    Freddie81 is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2018
    Posts
    149

    Help with Query to get Specific datauery to only display data for a specific InvoiceID

    Hi everyone

    I'm battling with a query. I've got tables (InvoiceT and CustomerT) with fields in the Query as seen in image. I want the Query to only display data from a specific InvoiceID. I entered forms![InvoicesF]![InvoiceID] under criteria and when I run it it works. Problem is: How do I get the Query to display this info when I click on a field called [InvTotal] on a form called InvoicesF ?

    I've attached screesnshots of the forms I'm using and the Query.Click image for larger version. 

Name:	InvoicesF.JPG 
Views:	9 
Size:	76.2 KB 
ID:	34044Click image for larger version. 

Name:	transactiobsQ.JPG 
Views:	10 
Size:	64.3 KB 
ID:	34045Click image for larger version. 

Name:	transactionsF.JPG 
Views:	10 
Size:	55.1 KB 
ID:	34046

    Your Guidance will be appreciated

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    18,762
    Paul (wino moderator)
    MS Access MVP
    www.BaldyWeb.com

  3. #3
    Freddie81 is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2018
    Posts
    149
    PBaldy...Thank you for the reply, but no it is not (yet). At the moment I'm still trying to get the Query to work and then only will I go into the onclick event where that code will be useful

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    18,762
    I'm confused; you said above that the query works. I guess you could base a form on that query and just open that.
    Paul (wino moderator)
    MS Access MVP
    www.BaldyWeb.com

  5. #5
    Freddie81 is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2018
    Posts
    149
    I said the Query worked whn I entred criteria to prompt for the InvoiceID, but I need it to pull it from th form InvoicesF

  6. #6
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    18,762
    Presuming everything is spelled correctly and the form is open, what you had should work:

    forms![InvoicesF]![InvoiceID]
    Paul (wino moderator)
    MS Access MVP
    www.BaldyWeb.com

  7. #7
    Freddie81 is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2018
    Posts
    149
    Yes then it works. What I'm trying to do is to have the user click on [InvTotal] on the Datasheet displaying the invoices table so when he clicks on it, it displays only the records from the query relating to the invoiceID of that record. That is wat is not working. It only shows the first reord everytime no matter which one I click on

  8. #8
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    18,762
    Can you attach the db here?
    Paul (wino moderator)
    MS Access MVP
    www.BaldyWeb.com

  9. #9
    Freddie81 is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2018
    Posts
    149
    Ive changed the database now. When the user clicks on the invoice number it shows the invoice info ND now shows th transaction history of that invoice. It shows the invoice and then any paymnts that were made. On this for it works perfetly so I am just going to leave it as is. So to see the payments on a speciic invoice the user eeds to open that invoice.

  10. #10
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    18,762
    If you're happy I'm happy.
    Paul (wino moderator)
    MS Access MVP
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 3
    Last Post: 11-28-2016, 02:17 PM
  2. Replies: 4
    Last Post: 05-18-2016, 02:32 PM
  3. Replies: 4
    Last Post: 06-02-2014, 09:07 AM
  4. Replies: 2
    Last Post: 06-09-2011, 08:47 AM
  5. Replies: 5
    Last Post: 03-03-2011, 02:56 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
  •  
Tech Forums: Microsoft Office Forums