Results 1 to 10 of 10
  1. #1
    kloun04 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Wisconsin
    Posts
    33

    Invoice not filtering correctly for form

    I downloaded the MS Access Template "Time and Billing" to set up for a small business and the Invoice isn't pulling in the correct data based on the filter that is applied. Since I didn't create the db myself I am having a heck of a time trying to resolve the problem. Everything else I have set up for the db is working fine, just not the invoicing part. I set up a couple dummy accounts in a test database so that I could share it here (see attachment).



    I created a project for two customers and when I click on the "Project Details" form the information is displayed correctly for all subforms. However, when I click on "Print Invoice" the invoice displays the first customer's information no matter which customer I am looking at. If I click on the "Invoice" report directly, I never know which invoice is going to come up. When I look at the code for the invoice the Filter is set to [ProjectID]=1. I don't know enough about the code for the filter to decipher how to get it to filter to the record displayed and not the first record in the list. I've tried different variations and can't get anything to work. Either I'm not looking at this correctly or there is a bug in this particular template.

    Any assistance would be helpful.

    Thank you.
    Attached Files Attached Files

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    The sample you uploaded is empty.

  3. #3
    kloun04 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Wisconsin
    Posts
    33
    Sorry. Not sure what happened. Let's try this again.
    Attached Files Attached Files

  4. #4
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Seems to be working OK for me. From the project list I double-click the third project name (Martha) that takes me to the Project Details page then I click print invoice and I get the Invoice for Martha. How /what are your steps?

    Cheers,
    Vlad

  5. #5
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,388
    Your macro needs criteria to specify the project:
    Click image for larger version. 

Name:	crit.png 
Views:	9 
Size:	30.5 KB 
ID:	38794

  6. #6
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376
    If you open the Project List you can see all projects. If I open "Invoice" I see all projects because it looks like a continuous form which may be fine if you want it that way. If however, from the "Project List" I click on the ID # an Invoice Form opens that is linked to a single Project and prints as expected.

    It may be a case of you not knowing how the developer expected it to be used, not sure.

    Dave

  7. #7
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,388
    My previous post#5 was for printing from the dropdown on the Project List form.
    Here's a fix for the Project Details form. Rearrange the macro like this. The problem was that the Project Details form was being closed before the report was opened, so the ID from the form was not available to pass to the report. I don't see any reason to close the form anyhow, so you might just remove that part of the macro altogether instead of moving it down below the report Open.

    Click image for larger version. 

Name:	details.png 
Views:	7 
Size:	29.9 KB 
ID:	38795

  8. #8
    kloun04 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Wisconsin
    Posts
    33
    Dave and Gicu…. Thank you, I never thought of opening the invoice from the Project List page. You're probably right Dave, a case of not knowing the intent of the developer. Makes perfect sense.

  9. #9
    kloun04 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Wisconsin
    Posts
    33
    Davegri-PERFECT!
    Just what I was looking for! THANK YOU!

  10. #10
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,388
    UBet, glad to help.

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

Similar Threads

  1. Form not filtering dates correctly
    By whisp0214 in forum Forms
    Replies: 5
    Last Post: 04-24-2018, 01:28 PM
  2. Invoice Form filtering Expenses
    By SierraJuliet in forum Forms
    Replies: 7
    Last Post: 01-20-2018, 09:04 AM
  3. Replies: 2
    Last Post: 09-14-2015, 09:01 AM
  4. Replies: 15
    Last Post: 12-10-2012, 06:37 PM
  5. Replies: 1
    Last Post: 10-10-2012, 01: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