Results 1 to 3 of 3

Thread: Combobox help!!

  1. #1
    Join Date
    Nov 2003
    Posts
    150

    Unanswered: Combobox help!!

    Hi,

    I'm putting together a point of sale system with Access 2000. In my Orders form, i want to have a combobox that lists the products available. Once the choice is made, i want the unitprice to be displayed in the next field. Some ppl have mentioned using the DLookup command, but i'm still not quite sure on the proper way to use it.

    the names of my fields are:
    ProductName
    UnitRetail

    any help?
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

  2. #2
    Join Date
    Nov 2003
    Location
    Europe
    Posts
    369

    Re: Combobox help!!

    if the form is based on a query that includes both fields, or directly on the table itself, the value of unitprice should appear automatically in the other text box (if bound to that table field, that is) when you select the value in the combo box...

  3. #3
    Join Date
    Oct 2003
    Location
    São Paulo - Brazil
    Posts
    91
    In the combobox´s rowsource, u should have something like:


    Select [YourTable].[ProductID] from YourTable;

    Add another row, with the price:

    Select [YourTable].[ProductID], [YourTable].[Price] from YourTable;

    In the comobobox after Updateevent:

    me.PriceFieldName = me.comboboxname.column(1)
    me.refresh

    Remember the first column´s number is 0 (zero).
    My environment: Windows XP/ Access 2000 - Using Microsoft DAO 3.6 Library

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •