Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Designer is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    15

    Review and correct possible coding problem from MS Access Template "Time and Billing"

    Hello, I am a new Access user in Access 2019 and I have downloaded the boilerplate template from the Access Template screen shown upon opening Access. I am using the Template "Time and Billing". I have made some modifications which all are working but I have an issues when I go to the "print invoice" button in the "project Details" form. So I went back and downloaded the original template straight out of the box to make sure I had not caused the issue. The issue: I set up several test customers and gave them projects, and then entered hours to be billed for each. When I check all of the query's, forms, and reports all of the information appears correctly as far as I can tell. When I go to the first record in the "Project Details" form and hit the "print invoice button, I get the first record shown and printed correctly, however, when I go to the second and third records which are all different, hitting the "print invoice" button will only show the first record, regardless of which record I am viewing. I hope this description makes sense, and I am attaching screen shots of the "build event" screen as well as the Property sheet for the button. I could attach a copy of the file if need be, but it is the standard "time and billing" template shown on the Access start up screen. Any help with this would be extremely appreciated! Hopefully my attachments are added correctly.
    Attached Files Attached Files

  2. #2
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    I don't use macros but try to remove one of the two = signs in the Where Condition towards the bottom of the Build Event.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    Try the macro this way. It appears that the form was closed before the ID was properly passed to the report. I saved the Project ID to a tempvar before closing the form and used it as criteria for the report.

    Click image for larger version. 

Name:	macro.png 
Views:	35 
Size:	25.9 KB 
ID:	41515

  4. #4
    Designer is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    15
    Quote Originally Posted by Gicu View Post
    I don't use macros but try to remove one of the two = signs in the Where Condition towards the bottom of the Build Event.

    Cheers,
    Thanks for the idea. I tried it and got this error message (see attached).
    Stay healthy out there!
    Attached Files Attached Files

  5. #5
    Designer is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    15
    [QUOTE=davegri;452366]Try the macro this way. It appears that the form was closed before the ID was properly passed to the report. I saved the Project ID to a tempvar before closing the form and used it as criteria for the report.

    Click image for larger version. 

Name:	macro.png 
Views:	35 
Size:	25.9 KB 
ID:	41515I gave it a try, but I still get the same result. Each time with the "print invoice" button it pulls up only the first record regardless of which one you are on.
    Stay healthy out there!

  6. #6
    Designer is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    15
    [QUOTE=Designer;452372][QUOTE=davegri;452366]Try the macro this way. It appears that the form was closed before the ID was properly passed to the report. I saved the Project ID to a tempvar before closing the form and used it as criteria for the report.

    Click image for larger version. 

Name:	macro.png 
Views:	35 
Size:	25.9 KB 
ID:	41515Hold everything, I see I missed a line...…...I will go back one more time to make sure I have it correct and then return!

  7. #7
    Designer is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    15
    [QUOTE=Designer;452373][QUOTE=Designer;452372]
    Quote Originally Posted by davegri View Post
    Try the macro this way. It appears that the form was closed before the ID was properly passed to the report. I saved the Project ID to a tempvar before closing the form and used it as criteria for the report.

    Click image for larger version. 

Name:	macro.png 
Views:	35 
Size:	25.9 KB 
ID:	41515Hold everything, I see I missed a line...…...I will go back one more time to make sure I have it correct and then return!
    OK, after double checking to match yours correctly IT WORKED!!!! You are the best, I can't thank you enough! Hope you are staying healthy in all of this craziness!

  8. #8
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    OK, after double checking to match yours correctly IT WORKED!!!! You are the best, I can't thank you enough! Hope you are staying healthy in all of this craziness!
    Good to hear. The bad news is that there's still a problem with the template as supplied. If you print an invoice from the dropdown on the Project List form, you always get the same invoice regardless of the row selected.
    i can't figure a way to fix that in the existing macro. If you want to go with VBA, I can supply code for that.

  9. #9
    Designer is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    15
    Quote Originally Posted by davegri View Post
    Good to hear. The bad news is that there's still a problem with the template as supplied. If you print an invoice from the dropdown on the Project List form, you always get the same invoice regardless of the row selected.
    i can't figure a way to fix that in the existing macro. If you want to go with VBA, I can supply code for that.
    UGH! one step forward, two steps back it seems!

    Remember I am new to all of the code stuff and so I have no preconceived notions of the best way to do things. My main goal is to create something that will allow me to track my time, and bill for it accordingly, and so my only criteria is to get what I need to make it happen. I am willing to make whatever adjustments necessary if you bear with me in getting it correctly installed. In looking ahead to how they have set up the transactions I am wondering how to address the posting or printing of an invoice, which needs to then take it off the current timesheets and store it in (presumably) an invoice table. Sorry if I may be wandering from the topic but it is all related. I really appreciate any help in getting this accomplished!

  10. #10
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    In looking ahead to how they have set up the transactions I am wondering how to address the posting or printing of an invoice, which needs to then take it off the current timesheets and store it in (presumably) an invoice table.
    So if an invoice is closed, you would like it to not appear on the Project List form?
    OK, you need to define what makes an invoice "closed". Maybe paid with zero balance due? Maybe the user un-checks a new "Active" checkbox on the Project List form? Or something else?

  11. #11
    Designer is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    15
    Quote Originally Posted by davegri View Post
    So if an invoice is closed, you would like it to not appear on the Project List form?
    OK, you need to define what makes an invoice "closed". Maybe paid with zero balance due? Maybe the user un-checks a new "Active" checkbox on the Project List form? Or something else?
    Thank you for your help. I would say closed could be an automatic de-select upon receiving a payment, or it could become not active when it is printed. Just so it is out of the mix of the time query or table for the next invoice. It is hard for me to visualize an easy way of accomplishing these tasks. Basically I bill once a month for work done that month, or upon the completion of a job. I also occasionally need to send out a statement showing how late a payment has become. Wow, I hope I am not confusing the issue, but as someone who knows databases you probably have a better grasp on the sequencing of the events. In case I have not mentioned, I have set up my time tracking as clockIn and clockOUT buttons on a timesheet form, which record a timestamp (& datestamp), and then I am using the "datediff" to show the hours worked in query's and tables. A final element which I have not fully grasped is that I want to track all of my time for business practice and review, but only about half of my time is billed hourly, the rest needs to be stored for reporting, but is billed by a square foot quantity. I have considered using the Category field for the different types of time. Now that I have muddled your brain with all of this I appreciate any feedback as to the best way to achieve these goals. Best Regards!

  12. #12
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    Designer, I tried to PM you but the forum rejected the attempt. Can you post your DB here with your changes?

  13. #13
    Designer is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    15
    Quote Originally Posted by davegri View Post
    Designer, I tried to PM you but the forum rejected the attempt. Can you post your DB here with your changes?
    OK, here is a copy. It is a work in progress in trying to figure out how to tie things together while learning how Access works at the same time. It should give you a feel for my goals, using a standard template as a starting point and trying to adapt it.

    Thank you for any feedback!

    The db is larger than the allowable maximum file size...……………...hmm, options?

  14. #14
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Have you tried
    -compact and repair utility to remove any bloat,
    -create a zip of the database and post.

  15. #15
    Designer is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    15
    Quote Originally Posted by Designer View Post
    OK, here is a copy. It is a work in progress in trying to figure out how to tie things together while learning how Access works at the same time. It should give you a feel for my goals, using a standard template as a starting point and trying to adapt it.

    Thank you for any feedback!

    The db is larger than the allowable maximum file size...……………...hmm, options?
    Here it is again...……..if it works.
    Attached Files Attached Files

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Desktop Time and Billing Template
    By medrison in forum Access
    Replies: 8
    Last Post: 10-29-2015, 12:32 AM
  2. Desktop Time and Billing Template with VAT
    By Jazz Man in forum Access
    Replies: 3
    Last Post: 11-12-2013, 04:23 PM
  3. Replies: 0
    Last Post: 03-13-2013, 08:00 AM
  4. Replies: 2
    Last Post: 03-29-2012, 08:49 AM
  5. Access 2003 Template Problem - Time and Billing
    By davidelsbury in forum Database Design
    Replies: 4
    Last Post: 10-05-2011, 07:40 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