Results 1 to 3 of 3
  1. #1
    breakingme10 is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jan 2014
    Location
    Oklahoma
    Posts
    153

    Add New Line Item Detail to Invoice Based on Status

    I'm doing my storage unit database and going through and trying to figure out how to get the invoices that are marked as "late" to add another "product" to the invoice called "late fee" which is already in my products table. i just need to find the right method of automatically adding that to the invoices marked late. can anyone help me with this? i can post an empty version of my db if you need me to. but the client data is very sensitive so i can only give you a blank sample db to see what i've already done.

    EDIT: db too big to upload here, i uploaded it to google drive

    https://drive.google.com/file/d/0B9J...it?usp=sharing
    Last edited by breakingme10; 06-20-2014 at 12:04 PM. Reason: Attached db

  2. #2
    breakingme10 is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jan 2014
    Location
    Oklahoma
    Posts
    153
    So i've tried VBA

    Code:
    With Me.[sfrm_InvoiceDetails].Form.RecordsetClone
    .AddNew
    !Item=32
    .Update
    EndWith
    but it gives me the error "a related record is required in tbl_Invoices", but i'm adding an extra line to the details subform so the InvoiceID field isn't populating with the CurrentRecords invoice#. That is my hypothesis anyway. How to I get it to add that records invoice#?
    Add a line under !Item=32 like !InvoiceID=CurrentRecord or what? I suck at VBA i'm sorry. Please someone help me on this?

  3. #3
    breakingme10 is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jan 2014
    Location
    Oklahoma
    Posts
    153
    Update: i got it working but now it adds the late fee everytime the form is opened and it sees that the status is overdue. how can i make it check to see if the late fee is already in the item list before adding it.

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

Similar Threads

  1. Replies: 9
    Last Post: 06-26-2013, 08:28 AM
  2. PO Detail Subform Line Numbering Problem
    By ChrisThomas99 in forum Programming
    Replies: 4
    Last Post: 02-05-2013, 04:31 PM
  3. Line item query
    By michaeltorpedo in forum Queries
    Replies: 9
    Last Post: 05-02-2012, 01:17 PM
  4. Conditional calculations in the detail line
    By stupesek in forum Reports
    Replies: 10
    Last Post: 09-23-2010, 11:00 AM
  5. Multiple detail items per line
    By needafix in forum Reports
    Replies: 3
    Last Post: 10-22-2009, 11:04 AM

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