Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppress list items in combo box

Status
Not open for further replies.

deadyankee

Technical User
Jul 22, 2001
11
GB
Hi all,

I have a combo box (cboLSC2) which lists the fields from a table selected in another combo box (cboLSC1) using the following code:

Private Sub cboLSC1_AfterUpdate()
With cboLSC2
.RowSourceType = "Field List"
.RowSource = cboLSC1.Value
End With
End Sub

This code works fine, but lists ALL the fields in the selected table. Unfortunately, this contains a URN field that I don't really want users to see. Any suggestions on how to hide this field?

TIA
 
Hi,

I'm not sure of what you want to do. But if it's what I think, you should check out the propriety colomn width.
set the one you don't wish to see to 0

hope this helps you out.

Rick
 
Rick,

Thanks for the response, but its not really what i was asking. Probably my fault for not being clear! Basically, what I want to know is where a combo box has its rowsource type as a table field list, is it possible to prevent one of the table's fields being displayed in the combo box list?

Cheers
 
As Rick said By setting the columns width to a value of zero

lets assume you have

name salary job

as the fields in your table and you dont want to show the salary

set column width to

1";0;1" and salary will not be displayed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top