Results 1 to 5 of 5
  1. #1
    Purdue_Engineer is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2012
    Posts
    9

    Automating Form Entry

    I am interested in trying to automate form entry on a subform. I have searched around the web for a good answer but haven't had any luck.

    The main form is "Customers" and each customer has a unique ID#, among other obvious attributes i.e. name, address, phone number, etc.

    The subform is "Invoices". There is a "one-to-many" relationship established between each customer and his or her respective invoices. Invoice numbers are generated automatically.

    Each customer is billed every quarter.

    I am currently entering the invoice amount, invoice type (i.e. initial, quarterly, or final), and invoice date.

    My goal is to create a tool which will automatically bill all customers in the database quarterly without having to input the redundant information for each individual customer.



    I'm thinking that I will need to input the quarterly invoice amount once and then use that amount to automate all future quarterly invoices. I could make the invoice date be the current date.

    I appreciate the help.

    Thanks

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Each Quarter a client generates a new invoice? Do you want to create an Invoice or a report that is a Statement?

    A user defined function could include code to append a record to the Invoices table. You could have the UDF fire during Startup.

  3. #3
    Purdue_Engineer is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2012
    Posts
    9
    Yes. I'd like to create a new invoice for each customer and then print a report for each invoice.

    I'm not well versed in creating UDF's. I'd like to use "Actual Removal Date" to determine which customer gets billed. For example, if customers A,B,C, and D are in the database and customer A has a value in the "Actual Removal Date" field, then only customers B,C, and D get billed (the field would be null for B,C, and D). Could you advise me on how to formulate that into a UDF?

    Thanks for your help!

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Then you should start by creating a query that will retrieve the clients that need to be invoiced. With that you could run an action query to append records to the Invoices table.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    What will be the source of data to use as a template for each invoice?

    Maybe:

    CurrentDb.Execute "INSERT INTO Invoices(InvoiceDate, CustomerID, InvoiceType, InvoiceAmount) SELECT #" & Date() & "#, CustomerID, InvoiceType, InvoiceAmount FROM tableORquery WHERE [Actual Removal Date] Is Null;"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 5
    Last Post: 03-09-2014, 07:16 PM
  2. Replies: 1
    Last Post: 02-28-2014, 02:17 AM
  3. Automating a process with a form
    By Topper in forum Forms
    Replies: 2
    Last Post: 06-12-2013, 09:14 AM
  4. Replies: 6
    Last Post: 09-27-2012, 08:27 AM
  5. automating data entry
    By phineas629 in forum Programming
    Replies: 2
    Last Post: 10-26-2011, 01:04 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