Results 1 to 3 of 3

Populate table with multiple records in one click event

  1. #1
    Ganymede is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    57

    Populate table with multiple records in one click event

    I have a table that tracks jobs I receive from clients (jobs table). Each job has various tasks, which I track with a separate able (tasks table).




    I have a third table from which I track billings (receivables table). When I bill clients, I bill for every task associated with a particular job at once. Each task is identical, so they are all billed at the same amount. However, my clients prefer separate invoices for each task.

    I'm trying to write a code that will populate the receivables table with a separate row for each task so I can generate separate invoices from that. Each row would be almost identical with the exception of the invoice# and taskID. I'm hoping this can be done with the click of a command button.

    Ideally, the receivables table would look like this.





    There has to be some variety of the "Insert into" function that provides for this. But I can't quite figure out how to program it to populate rows on the receivables table commensurate with the number of tasks for a particular job.

    Another obstacle I will face is generating the invoice number. Under my current system, the invoice number is generated by a form control that calculates the number of invoices billed within the year. Then it adds the month and year. For instance, 0216-040 means that this is invoice was created in February 2016, and it is the 40th invoice this year.

  2. #2
    Lukael is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    239
    Each task is identical, so they are all billed at the same amount.
    I don't quite follow, I they are all same in amount, why bother to make table changes ? Just design a report that would show all tasks that are linked to that record - invoice in your case.

    Maybe attaching sample would be a better idea.

  3. #3
    Ganymede is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    57
    Quote Originally Posted by Lukael View Post
    I don't quite follow, I they are all same in amount, why bother to make table changes ? Just design a report that would show all tasks that are linked to that record - invoice in your case.

    Maybe attaching sample would be a better idea.
    I'd be happy to attach a sample. I'll work on that today. But as I said, my clients prefer receiving separate invoices for each task. So consolidating all tasks onto a single report won't cut it.

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

Similar Threads

  1. Replies: 6
    Last Post: 01-20-2016, 05:52 PM
  2. Replies: 13
    Last Post: 09-10-2015, 03:37 PM
  3. Opening records via Double-Click event on a search form.
    By IncidentalProgrammer in forum Programming
    Replies: 4
    Last Post: 11-21-2014, 03:47 PM
  4. Replies: 3
    Last Post: 03-27-2012, 10:15 AM
  5. Click Event to create Records in two tables
    By mrfixit1170 in forum Forms
    Replies: 11
    Last Post: 10-20-2011, 12:01 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