Results 1 to 2 of 2
  1. #1
    daddylongtoe is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2010
    Posts
    7

    Question How do I display the last record?

    Hi

    I am trying to setup a basic purchase order generating system for our nurses to use when ordering supplies. The problem I am having is that I have a table setup to take details of products we order including descrption and price, but when I raise a new order it doesn't disply the price as recorded in the Products table, even if I select the appropriate source.

    As I fill out a new purchase order it allows me to select the product from a drop down list, but then it requires the price to be entered again. The source is calling for UnitPrice, which is what the field is called in the Products table. Also, when I enter a cost in manually it doesn't update the cost in the Products table either, only on the PurchaseOrder table.

    The problem lies between the tables/forms for Products & PurchaseOrders. I want the purchase order to contain the price as recorded in the Products table when the item is selected. If there is an updated the price the nurse should be able to type this in as she fills out the order and it will update the Products table.

    I hope this makes some sort of sence, but I welcome any questions as I'm sure you'll require more details. I will greatly appreciate any help.

    Thanks



    Steve

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You need to use the AfterUpdate event of the ComboBox to fill in the price from the RowSource of the ComboBox. Me.PriceControl = Me.ComboBox.Column(2)
    ...replacing the RED values with the actual names of your controls. The Column(n) value is zero based so 2 would be the 3rd column.

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

Similar Threads

  1. Replies: 1
    Last Post: 04-11-2010, 04:05 AM
  2. Replies: 0
    Last Post: 11-03-2009, 11:42 AM
  3. Replies: 3
    Last Post: 10-23-2009, 05:03 PM
  4. Click a record to display it for edit
    By mapl in forum Access
    Replies: 0
    Last Post: 11-24-2008, 03:02 PM
  5. How to display data from another record
    By rodrigo in forum Access
    Replies: 1
    Last Post: 07-24-2006, 07:29 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