Results 1 to 2 of 2
  1. #1
    total13 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Posts
    1

    Form Values to Table & Updating Calculated Fields on Form

    I am stuck trying to figure out how to get data entered into a Form (frmOrderForm) to transfer and be saved into a Table (tblCustomerOrders). I am aware that I built the Form prior to the Table and currently the fields are Unbound. However, when I tried to make them Bound to the Table, the values in the first group (OrderLine1) would duplicate in the next groups (OrderLine2 and OrderLine3). This duplication would also happen if I updated values in OrderLine2 or OrderLine3. In other words, all OrderLines would update to whatever OrderLine was last updated, which is not what I want to happen. I want each OrderLine to be independent from the others.

    Basically, what I'm trying to do is enter orders into frmOrderForm and have them save to tblCustomerOrders. On tblCustomerOrders, each InvoiceNbr could have up to three rows associated with it based on the number of OrderLines entered into frmOrderForm and each OrderLine would have its own row on tblCustomerOrders. Am I missing something simple or would a different design suit what I'm trying to do better?

    One other issue that I am having on frmOrderForm is getting the txtbxTotalApproxPcs and txtbxSubtotal to continually update as form entry is taking place. Currently, all three OrderLines need to be completed before these fields will update (probably because they are calculated sums of other calculated fields). This is not how I want it to work, though, because a customer may order one OrderLine. I tried to write expressions to trigger the update of these fields after txtbxLineApproxPcs1 and txtbxLineTotal1 were updated but it didn't work.

    I am fairly new to Access so there may be a number of issues with my Forms and Tables that I am not aware of but any assistance or direction is greatly appreciated. Feel free to ask me for more details.

    Many thanks in advance!

    Also, this is my first post to this forum so feel free to inform me if I've done anything incorrectly.



    Database - 2012.03.26.zip

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    Can't have multiple 'order lines' like that. Remove two of the sets.

    Can't do totals like that either. Remove those textboxes.

    You don't want to repeat the customer info on each line.

    Need a table of customers and a table for orders and a table for order details. Review this tutorial http://forums.aspfree.com/microsoft-...es-208217.html

    and this http://office.microsoft.com/en-us/ac...010098674.aspx
    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: 2
    Last Post: 01-09-2012, 08:15 AM
  2. Calculated fields in form
    By speckytwat in forum Access
    Replies: 15
    Last Post: 04-27-2011, 05:01 PM
  3. Replies: 5
    Last Post: 03-23-2011, 02:28 PM
  4. Replies: 0
    Last Post: 03-08-2011, 05:56 PM
  5. updating a form with new values
    By markjkubicki in forum Programming
    Replies: 16
    Last Post: 08-27-2010, 10:08 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