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

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
 
S

Sandra Daigle

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"
 
R

Rhonda Fischer

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

.
 

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

Similar Threads

=> cboSupplierName to determine cboCustomerName 1
Fill combobox and form 1
Sort Form by Combo Box Text 1
combo box 2
How to assign a value to a combo box? 3
Combo Box dilema 5
Combo Box Sources 3
combo box 2

Top