Problems with mulitiple records for linked field

M

Mike, Controller

I'm attempting to take a table which shows pending orders by SKU and have the
data appear in a subform for a Form. The problem is the original table has a
single line for each order # which means I may have an SKU repeating several
times depending on the # of pending orders for that SKU. My subform will
only show the first order for an SKU and not all orders. How do I get the
data to show the SKU once, but display all of the pending orders for that SKU
in my subform?
 
F

Fred

You need a new structure. Like:

"Order" table,

PK = OrderNumber

"OrderItems" table (one record for each instance of a sku being in an order)

FK = "OrderNumber" and linked to that field in the orders table

Also, if you neede, a lookup table with sku #'s

The orders in your main form, and orderitem,s is your sub form
 
M

Mike, Controller

Thanks Fred. Actually, I just changed the display of the subform to be
datasheet view instead of single form and it worked....not as visually
appealing, but it works. Thanks for the response.
 
J

John W. Vinson/MVP

Thanks Fred. Actually, I just changed the display of the subform to be
datasheet view instead of single form and it worked....not as visually
appealing, but it works. Thanks for the response.

Continuous View on the subform may be the compromise you want - shows
multiple records and can look nicer than a datasheet.
 
M

Mike, Controller

THANKS JOHN! Exactly what I needed to make the subform match the other
formatting. Have a great day!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top