Lookup problems on subform

  • Thread starter Thread starter mc
  • Start date Start date
M

mc

Hi
I am creating an order form based on 3 tables -
Products (ProductID, ProductDesc)
Order ID (OrderID, Customer, Date)
Order Details (OrderID, ProductID, Qty)

Data kept in Order Details table will be from the subform.
My problem is how do I lookup the Product Description from
the Product ID selected by the user?

I tried the DLOOKUP function but it doesn't seem to work.
BTW, I am using Access97.

Thanks!
 
MC,

If you don't want to see the ProductID on the subform, just use a
combobox, bound to the ProductID field, but with its RowSource set to
the Products table, and set the properties of the combobox as
ColumnCount = 2, BoundColumn=1, and ColumnWidths being 0;x where x is
the appropriate width to display the ProductDesc. If you do want the
ProductID shown on the form, and the ProductDesc shown separately,
make a query which includes both the Order Details table and the
Products table, joined on the ProductID field from each, and use this
Query as the RecordSource of the subform, in which case you will have
the ProductDesc field available to show, and the correct ProductDesc
value will be displayed as soon as you enter the ProductID for the
Order Detail line.

- Steve Schapel, Microsoft Access MVP
 
Back
Top