Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version


Upload now worked fine. While waiting kind of imagined what was really wanted. Turned out to be correct.

You don't need a sub form here. All that is needed is a list box on the main form for the sold item. The list box is based on SQL of the ItemMaster:

SELECT "Item_Name", "ID" FROM "ItemMaster"

The first field in the select is what is displayed with the second field being stored in the record. The selection of what is stored is determined in the properties of the control on the Data tab. This is the Bound field. Here it is set to 1 with the number relative to 0. So the second field in the select statement is what is stored.

Also, with a list box, there is no need to scroll down the list to find the wanted item. Just start typing and the list will bring up the items as the characters change. For more information see the documentation in Section (Chapter) 4 - Forms - List box. You may want to also look at a Combo box to see the similarities. They are different but worth noting. Your choice seems to be good.

Have attached your sample back with a modified version of your form and the list box inserted.

Sample ----- ListBoxSales.odb