Results 1 to 6 of 6
  1. #1
    ManuelLavesa is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2015
    Posts
    113

    How to display a value of one field into another field

    Hello all, this is what I am trying to accomplish, I have a Purchase Order Receiving Form. In that form there are two fields, one is "QtyPurchased" and the other is "QtyReceived". And I would like it to have them display the same value because for most orders the QtyPurchased should equal the QtyReceived. But the difference is that for QtyPurchased is on the table PurchaseOrders from when I made the purchase Order, And for QtyReceived I want the value displayed but not saved on the table as it is not received yet, and I should be able to modify it if the qty Received is less than the Qty Purchased. Then when I press enter in the QtyReceived Field I would like the value to be saved on the table PurchaseOrders and added to the inventory.


    Could you please give me any ideas of how to accomplish this. Thank you for your help.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    QtyReceived field is also in PurchaseOrders table? So at what point do you want to populate this field - when the order record is created?
    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.

  3. #3
    ManuelLavesa is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2015
    Posts
    113
    Yes that field is also in the PurchaseOrders Table. I want to populate the field once the Purchase order is received, not while we are waiting for the products to arrive. So first we make the Purchase Order. The field QtyPurchased is populated, and the purchase order is sent to the supplier. Then once we get the products I open another form for receiving, and is in this form that we want to populate the QtyReceived field. The way I have it now that quantity is 0, and we have to input the quantity all the time, and most often is the same as the qtyPurchased. So I would like to make it so that the default value of QtyRecieved is = to QtyPurchased. But only after It is received.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Options:

    1. assuming the form is opened filtered to specific order record you want to edit, code in form Current event can immediately set value:

    If IsNull(Me!QtyReceived) Then Me!QtyReceived = Me!QtyPurchased

    2. that same code behind a button
    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.

  5. #5
    ManuelLavesa is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2015
    Posts
    113
    Yes the form is opened filtered to the purchase order. I tried what you suggested but it is not working. Meaning the qtyReceived is still =0. The fields are in a subform and I tried putting it directly into the subform, and in the main form and still it does not seem to work. Thank you for the code...

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Code needs to be behind form that has the fields.

    If you want to provide db for analysis, follow instructions at bottom of my post.
    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: 3
    Last Post: 10-28-2015, 12:38 PM
  2. Replies: 20
    Last Post: 01-13-2015, 02:23 PM
  3. Field Display Format
    By MaineLady in forum Access
    Replies: 7
    Last Post: 09-03-2014, 08:56 PM
  4. Display field as text box
    By thekruser in forum Forms
    Replies: 5
    Last Post: 08-31-2010, 10:37 AM
  5. Report control of a field display/no display
    By systems013 in forum Reports
    Replies: 5
    Last Post: 02-01-2010, 09:44 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