Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    akechag is offline Novice
    Windows 10 Office 365
    Join Date
    Nov 2021
    Posts
    7

    time and Billing access database template - reporting help

    Hi
    I have downloaded and started using the time and billing template.
    I have two issues that i do not know how to address.
    1. Because i have some projects that run through more than one month but at the same time i need to raise and invoice for each one of these projects at the end of each month, i need to modify the database so that i can issue an invoice depending on the month i need the invoice for.
    for example: i have a project running from September 2021....i will have to issue an invoice on September 30, October 31st, November 30th and so on....And each invoice should contain only the manhours and fees spend on this particular month, i.e. the October 31st invoice should contain only the manhours for October. But should also show any outstanding amounts from the previous month(s).
    2. there is now way (or at least i cannot find how to do it), to have a unique number allocated (and subsequently stored in the database) and printed on each invoice i issue. Then, when at a later time i need to reissue this invoice, the database should somehow return the same invoice with the same number.

    Any help is really appreciated and welcome. i am not really experienced with programming but i do understand some basic and intermediate Access concepts.
    I am using the template as it was and i have made no changes to the structure.



    Thank you very much in advance for your time to look into this post and your help if you can help

    SK
    Last edited by akechag; 11-18-2021 at 02:58 PM.

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    make a form with 2 text boxes; txtStartDate, txtEndDate


    query=:
    select * from table where [DateFld] between forms!fMyForm!txtStartDate and forms!fMyForm!txtEndDate


    you wont have to keep entering dates, and they can pick from calendar in the textbox, and it only gather the records for that range. Report on that query.

  3. #3
    akechag is offline Novice
    Windows 10 Office 365
    Join Date
    Nov 2021
    Posts
    7
    Quote Originally Posted by ranman256 View Post
    make a form with 2 text boxes; txtStartDate, txtEndDate


    query=:
    select * from table where [DateFld] between forms!fMyForm!txtStartDate and forms!fMyForm!txtEndDate


    you wont have to keep entering dates, and they can pick from calendar in the textbox, and it only gather the records for that range. Report on that query.
    Thank you ranman256
    I have created the form, that was easy.
    then i created the query named "query1" but when i try to save it it gives me an error highlighting the word "table" in the SQL code line. I suppose the query searches for a table, and because it cannot find the table, it gives the error code.
    Any ideas how to move forward?

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,928
    Quote Originally Posted by akechag View Post
    Thank you ranman256
    I have created the form, that was easy.
    then i created the query named "query1" but when i try to save it it gives me an error highlighting the word "table" in the SQL code line. I suppose the query searches for a table, and because it cannot find the table, it gives the error code.
    Any ideas how to move forward?
    You have to supply the correct table name as well as the correct field names?

    That is just an example?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,412
    I made a modified version of the time and billing template a few months ago that includes invoice billings. On demand, a new invoice for a project is created with amounts due since last invoice. Each invoice has an unique number. You cannot issue duplicate invoice numbers with different figures for each month. If you want to pursue this, PM me.


    The ProjectPayments table is replaced by the ProjectInvoices table:


    Click image for larger version. 

Name:	inv.png 
Views:	30 
Size:	65.1 KB 
ID:	46703

  6. #6
    akechag is offline Novice
    Windows 10 Office 365
    Join Date
    Nov 2021
    Posts
    7
    Hi
    That can definitely work for me. unfortunately i cannot find the PM function in the forum

  7. #7
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,412
    Quote Originally Posted by akechag View Post
    Hi
    That can definitely work for me. unfortunately i cannot find the PM function in the forum
    Ah, yes. I think you have to have a certain minimum number of posts before PM privilege is granted.

    I had to pare down some functionality requested by a former patron, but hope core functionality is still intact.
    Project compiles with no errors, but runtimes may occur. My modifications were implemented against a DB with data already present. This DB is empty, and may have runtime errors when data entry initially starts. If you run into problems, help is always here.

    Click image for larger version. 

Name:	invdetail.png 
Views:	29 
Size:	45.6 KB 
ID:	46706

    And the DB:

    akechag-davegri-v01.zip
    Last edited by davegri; 11-18-2021 at 10:03 PM.

  8. #8
    akechag is offline Novice
    Windows 10 Office 365
    Join Date
    Nov 2021
    Posts
    7
    Hi davegri
    Really appreciate your help.
    This worked out really well. I only have a problem with the projects form. I debugged and got this when i click on the project id link to open an existing project (one i input as test) or when i click on the "new" link to enter a new project
    Any ideas?
    This is a screenshot of the debug
    Click image for larger version. 

Name:	Screenshot_1.jpg 
Views:	22 
Size:	51.4 KB 
ID:	46708

    I am now trying to create a report for a single invoice per customer, containing all projects for a given period.

    SK

  9. #9
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,928
    You have to say what the error is?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  10. #10
    akechag is offline Novice
    Windows 10 Office 365
    Join Date
    Nov 2021
    Posts
    7
    it says runtime error 3075 missing operator

  11. #11
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    Me.ID holds text data type and you are missing delimiting quotes for text? I know that missing delimiters will raise that error.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  12. #12
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,412
    I don't get that error. I added one customer, one employee, then added new project. Clicked on project and got project details:

    Click image for larger version. 

Name:	HelloOne.png 
Views:	21 
Size:	73.7 KB 
ID:	46711

  13. #13
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,412
    With further testing I did encounter the error.

    Click image for larger version. 

Name:	New.png 
Views:	22 
Size:	31.7 KB 
ID:	46712

    You can avoid the error with this code change:
    Code:
    Private Sub ID_Click()
        If (Form.Dirty) Then
            DoCmd.RunCommand acCmdSaveRecord
        End If
        If (Me.ID & "") = "" Then Exit Sub
        DoCmd.OpenForm "ProjectDetails", , , "Projects_PK=" & Me.ID, , acDialog
        
        Me.Requery
        On Error Resume Next
        DoCmd.SearchForRecord , "", acFirst, "[Projects_PK]=" & Me.ID
    End Sub

  14. #14
    akechag is offline Novice
    Windows 10 Office 365
    Join Date
    Nov 2021
    Posts
    7
    That did the JOB ! Thank you!!!

    Quote Originally Posted by davegri View Post
    With further testing I did encounter the error.

    Click image for larger version. 

Name:	New.png 
Views:	22 
Size:	31.7 KB 
ID:	46712

    You can avoid the error with this code change:
    Code:
    Private Sub ID_Click()
        If (Form.Dirty) Then
            DoCmd.RunCommand acCmdSaveRecord
        End If
        If (Me.ID & "") = "" Then Exit Sub
        DoCmd.OpenForm "ProjectDetails", , , "Projects_PK=" & Me.ID, , acDialog
        
        Me.Requery
        On Error Resume Next
        DoCmd.SearchForRecord , "", acFirst, "[Projects_PK]=" & Me.ID
    End Sub

  15. #15
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You are using
    Code:
    If (Form.Dirty) Then
          DoCmd.RunCommand acCmdSaveRecord
    End If
    I would use
    Code:
    If (Me.Dirty) Then
          Me.Dirty = False
    End If
    See Docmd.Runcommand accmdsaverecord vs Me.Dirty = False

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

Similar Threads

  1. Replies: 19
    Last Post: 04-12-2020, 12:51 PM
  2. Desktop Time and Billing Template
    By medrison in forum Access
    Replies: 8
    Last Post: 10-29-2015, 12:32 AM
  3. Desktop Time and Billing Template with VAT
    By Jazz Man in forum Access
    Replies: 3
    Last Post: 11-12-2013, 04:23 PM
  4. time and billing DB
    By gpnhmiller in forum Access
    Replies: 4
    Last Post: 12-31-2012, 04:27 PM
  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