Displaying info from combo boxes in sub-forms

  • Thread starter Thread starter Jule Gates
  • Start date Start date
J

Jule Gates

Guest
Has anyone any idea why a combo box I created to display Customer names from a Customer Table in my Quotes Form displays the correct information i.e the actual customer name, whereas when I then create a sub-form based on the origional form, the Customer field, (displayed as a text box) will only display the CustomerID - which incidently I never included in my origional combo box.

I hope this makes some sense!
 
Are u sure the combo box doesn't have the CustomerID hidden as it's first column? Look at the Column Count and Column Width properties under the format tab of the combo's properties.

Sorry if i'm stating the obvious.
 
Thanks for your reply.

Yes the customer ID is hidden in the first column of the combo-box and I tryed changing the column width and count properties but my sub form still returns the customer ID and not the customer name. Do you think it might be because I require the information in the sub form to be displayed in a text box rather than a combo box (so that it can't be changed - drop down arrows are tempting to click on!) and if so, is there something in the properties of the text box that I am missing or do I have to refer the text box somehow to the origional combo box?
 
Not 100% sure, but the way i see it,

U have a combobox that contains 2 fields:
CustomerID and Name

The u have a subform that has a textbox which is displaying customerID.

Is the subform bound to the same table as the Main form?

When u say u created the subform from the main form, i assume it basically the same, u just changed the combobox to a textbox.

If that were the case then the textbox would display the first column in the combo, which in this case would be CustomerID.

So u would have to change the control source of the textbox to refer to Customer name, not ID.
 
Dear DGM,

Thanks for your help. it now works as I wanted.

You are a star!
 

Users who are viewing this thread

Back
Top Bottom