=> Combo box to Display list of Suppliers save ID to Table

  • Thread starter Thread starter Rhonda Fischer
  • Start date Start date
R

Rhonda Fischer

Hello,

I would like to display a list of Suppliers in a combo
box and save the associated supplierID to the form table.

The Record Source of the form is: tblDeliveries which
holds the ID for supplier and customer.

The Control Source of the combo box is: supplierID an
integer value.

The Row Source of the combo box is:
SELECT DISTINCT [tblSupplier].[ID], [tblSupplier].
[supplierName] FROM tblSupplier ORDER BY [tblSupplier].
[supplierName];

And the Bound Column is 2 <== ***

I thought I could use the Bound Column property setting
to display the second column in the Row Source while
saving the ID to the Deliveries table using the Control
source.

I'm not having much luck. If I set Bound Column to 1 or 2
displays a list of Supplier ID's which isn't helpful for
the user.

Any suggestions would be terrific.

Thank you very much
Rhonda
 
Hi Rhonda,

Set the BoundColumn back to 1 since this is the value you want to store.
Then use the ColumnWidths property to hide the first column by setting its
width to zero and the width of the next column to something non-zero. For
example:

0";1"
 
Hello Sandra,

Thank you very much, that was very helpful.

Best Regards
Rhonda



-----Original Message-----
Hi Rhonda,

Set the BoundColumn back to 1 since this is the value you want to store.
Then use the ColumnWidths property to hide the first column by setting its
width to zero and the width of the next column to something non-zero. For
example:

0";1"


--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.


Rhonda said:
Hello,

I would like to display a list of Suppliers in a combo
box and save the associated supplierID to the form table.

The Record Source of the form is: tblDeliveries which
holds the ID for supplier and customer.

The Control Source of the combo box is: supplierID an
integer value.

The Row Source of the combo box is:
SELECT DISTINCT [tblSupplier].[ID], [tblSupplier].
[supplierName] FROM tblSupplier ORDER BY [tblSupplier].
[supplierName];

And the Bound Column is 2 <== ***

I thought I could use the Bound Column property setting
to display the second column in the Row Source while
saving the ID to the Deliveries table using the Control
source.

I'm not having much luck. If I set Bound Column to 1 or 2
displays a list of Supplier ID's which isn't helpful for
the user.

Any suggestions would be terrific.

Thank you very much
Rhonda

.
 
Back
Top