Results 1 to 4 of 4
  1. #1
    riley23258 is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2022
    Posts
    8

    Update table with new records using a form and subform

    Hello all,

    Problem:
    Trying to use a form and subform to track material receipts for a company.

    Created a receiving form "frm_Receiving" (attached). This form also contains a subform "frm_IBReceipts" this shows the purchased materials and is bound to a table "tbl_PurchMats". This table is updated by another form "frm_PurcahseOrders". The general concept is the customer can use frm_PurchaseOrders to enter new orders, and the receiving associates can then view those material items using the form "frm_Receiving" with the subform "frm_IBReceipts".

    The subform has a checkbox next to each material. I want for the end user to be able to click that check box and the following to happen:
    1). Add a new record to tbl_Receipts that will log:
    a). User Name (manually entered by associate)


    b). Date (auto populated on the form)
    c). Part Number
    d). Qty
    2). Save the record
    3). Ability to check multiple lines and each click adds a new record

    Once they are done receiving the materials for the current PO, they can click the "New Receipts" button and start the process again.


    Here's what I've tried so far, and this works to pull the current line part number and qty up into the main form, but it doesn't push the data to the tbl_Receipts, nor will it allow me to click multiple lines, when I do that it just updates a single record so I can click 3 or 4 line items and only have one record in the table reflecting the last click (without username, partnumber and qty)

    [/Private Sub Received_Click() Me.Parent.PartNumber = Me.SupplierPartNum
    Me.Parent.Qty = Me.Qty
    DoEvents
    DoCmd.RunCommand acCmdSaveRecord
    DoCmd.GoToRecord , "", acNewRec
    End Sub]
    Attached Thumbnails Attached Thumbnails frm_Receiving.jpg   subfrm_IBReceipts.jpg   tbl_Receipts.jpg   Active View frm_Receiving.jpg   frm_Receiving After Click Checkbox.jpg  


  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Have you checked the Similar Threads at the bottom of the page? Often can gain insight from such threads/posts.

  3. #3
    riley23258 is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2022
    Posts
    8
    After taking your suggestion, I read through some of the similar posts. I'm pretty novice with VBA and SQL alike so it could be me just not understanding the answer is there, but I didn't see anything that was very similar to my problem.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Can you post a copy of your database(zip format)? Doesn't have to be real data --any data sufficient to show the issue.
    I'm sure you'll get more focused responses when readers can see/test the actual situation.

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

Similar Threads

  1. Replies: 12
    Last Post: 03-11-2021, 07:28 AM
  2. Update Main Form and SubForm into Table
    By Mehvan in forum Forms
    Replies: 23
    Last Post: 10-06-2018, 11:26 AM
  3. Replies: 9
    Last Post: 08-07-2017, 12:28 AM
  4. Replies: 3
    Last Post: 10-12-2014, 02:43 PM
  5. Replies: 10
    Last Post: 01-29-2013, 08:59 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