Results 1 to 6 of 6
  1. #1
    1953hogan is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Posts
    10

    Store a field value from one table in a field in another table

    Hi,



    Working on a simple invoicing database for our small company. I realize there are tons of templates for this but I'm trying to teach myself as well, so
    i have what is probably a simple question. Here are my tables:

    Click image for larger version. 

Name:	Screen Shot 2017-03-30 at 10.17.45 AM.png 
Views:	12 
Size:	26.1 KB 
ID:	28065

    I've got an invoice form set up with invoice details subform and it works perfectly to create new invoices, but the subform is using the [Products].[Price] field, so any future price changes to products will result in changes to past invoices which we don't want.

    So, when an invoice is created and the InvoiceDetails table is populated, I'd like to store the [products].[Price] field into [invoicedetails].[PriceStored]. That way, historical invoices won't be affected by current product pricing.

    I've messed around with combo boxes for this without success. I'd be very appreciative for any help or ideas. Thanks very much.

    Steve

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    update query.
    youd run a query to update the field value from one table and update your current record.

  3. #3
    1953hogan is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Posts
    10
    Quote Originally Posted by ranman256 View Post
    update query.
    youd run a query to update the field value from one table and update your current record.
    Thank you. Can I set that up as an event to run when I enter the invoice?

  4. #4
    1953hogan is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Posts
    10
    Seems complicated. Any other ideas or can somebody walk me through this? Thank you.

  5. #5
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    Deleted, forgot that there could be many products shown on subform, my code covered only one.
    Last edited by davegri; 03-30-2017 at 03:31 PM. Reason: bo-bo

  6. #6
    1953hogan is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Posts
    10
    I've got the update query working. Thanks for the help!

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

Similar Threads

  1. Replies: 1
    Last Post: 08-27-2014, 04:16 PM
  2. Replies: 3
    Last Post: 02-17-2014, 12:56 AM
  3. Replies: 7
    Last Post: 11-03-2012, 06:17 PM
  4. Replies: 5
    Last Post: 11-01-2012, 09:26 AM
  5. Replies: 0
    Last Post: 09-25-2006, 03:42 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