Hey folks, here's my situation in a nutshell:
I've got a "Table/Query" type listbox that I am populating as follows:
-------------
SQLStatement = "SELECT * FROM tbl_StrategyDeliverables " & _
"WHERE StrategyID = " & ParentForm.txtID.Value
.
.
.
lstDeliverables.RowSourceType = "Table/Query"
lstDeliverables.RowSource = SQLStatement
lstDeliverables.Requery
-------------
This code and all the supporting code works fine...my question is this: I don't want to populate the listbox with all of the columns that my SELECT query has returned...I only need a few key columns. Is there a way (at runtime) to specify exactly which columns will be included in the listbox and in which order? Furthermore, is there a way for me to add custom column headers, rather than have just the field names from the database displayed?
Sorry if this is a rather elementary question...I'm somewhat new to access/VBA.
Thanks in advance,
Sam
I've got a "Table/Query" type listbox that I am populating as follows:
-------------
SQLStatement = "SELECT * FROM tbl_StrategyDeliverables " & _
"WHERE StrategyID = " & ParentForm.txtID.Value
.
.
.
lstDeliverables.RowSourceType = "Table/Query"
lstDeliverables.RowSource = SQLStatement
lstDeliverables.Requery
-------------
This code and all the supporting code works fine...my question is this: I don't want to populate the listbox with all of the columns that my SELECT query has returned...I only need a few key columns. Is there a way (at runtime) to specify exactly which columns will be included in the listbox and in which order? Furthermore, is there a way for me to add custom column headers, rather than have just the field names from the database displayed?
Sorry if this is a rather elementary question...I'm somewhat new to access/VBA.
Thanks in advance,
Sam