Results 1 to 3 of 3
  1. #1
    mihidum is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    2

    Help with populating fields automagically


    Hi,
    So I have 3 tables (books, customers, sales). I would like some help with setting up my sales form. I have used a lookup field to allow one to choose customer id from a drop down list, and figured out how to use the combo box wizard to make a similar drop down box to choose a book id. I cannot figure out how to get the matching cost price of the book to appear which is stored in the books table. I would also like to do something similar with a field from the customers table for the matching customer.
    I have a feeling the answer to this is pretty simple, but I've been searching for answers for a while and cannot find any

    Thankyou in advance =)

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Options to retrieve the price:

    1. Join the price table to the sales table in the form's RecordSource sql. Set jointype to 'show all records from Sales ...'. Bind textbox to price field and set properties Locked Yes and TabStop No.

    2. Multi-column product combobox. Textbox refers to price column of combobox

    3. DLookup function

    Do you want to actually save the price with the sales record or just display it? If you want to save the price, need code, I use VBA. In some event, such as the AfterUpdate of product combobox: Me![Sales].Price = Me.pricetextbox
    Last edited by June7; 05-06-2012 at 09:36 AM.
    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
    mihidum is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    2
    Thankyou so much for the reply
    I will try some of these things out and look them up

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

Similar Threads

  1. Pre Populating Form Fields
    By psuedo98 in forum Forms
    Replies: 3
    Last Post: 03-20-2012, 12:51 PM
  2. Populating fields
    By bjr001 in forum Forms
    Replies: 4
    Last Post: 10-11-2010, 10:19 AM
  3. Populating Fields
    By deiniolj in forum Forms
    Replies: 21
    Last Post: 12-08-2009, 10:51 AM
  4. Self Populating Fields
    By kellyd in forum Access
    Replies: 0
    Last Post: 09-17-2009, 10:20 AM
  5. Populating multiple fields
    By jjcaprio in forum Programming
    Replies: 11
    Last Post: 08-16-2009, 01:51 PM

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