Adding a new column to a List Box!

B

Bob V

I want to add this column to my list Box being the 5th column
tblInvoice_Itmdt.HorseID.TotalAmount

Any help would be appreciated.........Bob

lstModify.RowSource = "SELECT Format(MIN(dtDate),'dd-mmm-yyyy') AS
StartDate," _
& " Format(MAX(dtDate),'dd-mmm-yyyy') AS EndDate," _
& "
tblInvoice_Itmdt.HorseID,funGetHorse(0,tblInvoice_Itmdt.HorseID,false)" _
& " FROM tblInvoice_Itmdt" _
& " GROUP BY tblInvoice_Itmdt.HorseID" _
& " order by funGetHorse(0,tblInvoice_ItMdt.HorseID,true) " _
& ",funGetHorse(0,tblInvoice_ItMdt.HorseID,false);"




lstModify.ColumnCount = 4
lstModify.ColumnWidths = "0;1 in;0;1.5 in"
lstModify.BoundColumn = 2
 
F

fredg

I want to add this column to my list Box being the 5th column
bltInvoice_Itmdt.HorseID.TotalAmount

Any help would be appreciated.........Bob

lstModify.RowSource = "SELECT Format(MIN(dtDate),'dd-mmm-yyyy') AS
StartDate," _
& " Format(MAX(dtDate),'dd-mmm-yyyy') AS EndDate," _
& "
tblInvoice_Itmdt.HorseID,funGetHorse(0,tblInvoice_Itmdt.HorseID,false)" _
& " FROM tblInvoice_Itmdt" _
& " GROUP BY tblInvoice_Itmdt.HorseID" _
& " order by funGetHorse(0,tblInvoice_ItMdt.HorseID,true) " _
& ",funGetHorse(0,tblInvoice_ItMdt.HorseID,false);"

lstModify.ColumnCount = 4
lstModify.ColumnWidths = "0;1 in;0;1.5 in"
lstModify.BoundColumn = 2


lstModify.RowSource = "SELECT Format(MIN(dtDate),'dd-mmm-yyyy') AS
StartDate," _
& " Format(MAX(dtDate),'dd-mmm-yyyy') AS EndDate," _
& "
tblInvoice_Itmdt.HorseID,funGetHorse(0,tblInvoice_Itmdt.HorseID,false)"
_
& " FROM tblInvoice_Itmdt" _
& " GROUP BY tblInvoice_Itmdt.HorseID" _
& " order by funGetHorse(0,tblInvoice_ItMdt.HorseID,true)
" _
& ",funGetHorse(0,tblInvoice_ItMdt.HorseID,false)" _
& ",bltInvoice_Itmdt.HorseID.TotalAmount;"

If this new column is the 5th column ....
lstModify.ColumnCount = 5
lstModify.ColumnWidths = "0;1";0";1.5";1.5"
lstModify.BoundColumn = 2

The 1st and 3rd columns are hidden.
The 2nd column is 1-inch.
The 4th and 5th columns are 1.5-inches
The second column is what will be saved to the table if the list
box is bound to a table field.
 
B

Bob V

Fred I am getting a enter parameter error on :
tblInvoice_Itmdt.HorseID.TotalAmount
And then it is only showing one record and the last column is empty!
Thanks For the help..............Bob

lstModify.RowSource = "SELECT Format(MIN(dtDate),'dd-mmm-yyyy') AS
StartDate," _
& " Format(MAX(dtDate),'dd-mmm-yyyy') AS EndDate," _
& "
tblInvoice_Itmdt.HorseID,funGetHorse(0,tblInvoice_Itmdt.HorseID,false)" _
& " FROM tblInvoice_Itmdt" _
& " GROUP BY tblInvoice_Itmdt.HorseID" _
& " order by funGetHorse(0,tblInvoice_ItMdt.HorseID,true) " _
& ",funGetHorse(0,tblInvoice_ItMdt.HorseID,false)" _
& ",tblInvoice_Itmdt.HorseID.TotalAmount;"


lstModify.ColumnCount = 5
lstModify.ColumnWidths = "1 in;1 in;1 in;1.5 in;1 in"
lstModify.BoundColumn = 2
 
F

fredg

Fred I am getting a enter parameter error on :
tblInvoice_Itmdt.HorseID.TotalAmount
And then it is only showing one record and the last column is empty!
Thanks For the help..............Bob

lstModify.RowSource = "SELECT Format(MIN(dtDate),'dd-mmm-yyyy') AS
StartDate," _
& " Format(MAX(dtDate),'dd-mmm-yyyy') AS EndDate," _
& "
tblInvoice_Itmdt.HorseID,funGetHorse(0,tblInvoice_Itmdt.HorseID,false)" _
& " FROM tblInvoice_Itmdt" _
& " GROUP BY tblInvoice_Itmdt.HorseID" _
& " order by funGetHorse(0,tblInvoice_ItMdt.HorseID,true) " _
& ",funGetHorse(0,tblInvoice_ItMdt.HorseID,false)" _
& ",tblInvoice_Itmdt.HorseID.TotalAmount;"

lstModify.ColumnCount = 5
lstModify.ColumnWidths = "1 in;1 in;1 in;1.5 in;1 in"
lstModify.BoundColumn = 2

Bob,

1) Without a reference to the previous message, this post has no
relevance.
2) Other posters, who may have a similar need have no idea of what
this post is about.
3) I certainly don't keep past messages in mind, so to reply to this i
have to go back and forth to the previous message to refresh my
memory. It wastes time.

It is common courtesy to include the relevant portion of any previous
message when replying to a post, as I have with this message.

That being said....
4) I would expect, if the query is prompting you for a value for
tblInvoice_Itmdt.HorseID.TotalAmount, that you do not have a field in
the [tblInvoice_Itmdt] table with a name of [TotalAmount].
You'll have to check your table field names and data.
 
F

fredg

Fred I am getting a enter parameter error on :
tblInvoice_Itmdt.HorseID.TotalAmount
And then it is only showing one record and the last column is empty!
Thanks For the help..............Bob

lstModify.RowSource = "SELECT Format(MIN(dtDate),'dd-mmm-yyyy') AS
StartDate," _
& " Format(MAX(dtDate),'dd-mmm-yyyy') AS EndDate," _
& "
tblInvoice_Itmdt.HorseID,funGetHorse(0,tblInvoice_Itmdt.HorseID,false)" _
& " FROM tblInvoice_Itmdt" _
& " GROUP BY tblInvoice_Itmdt.HorseID" _
& " order by funGetHorse(0,tblInvoice_ItMdt.HorseID,true) " _
& ",funGetHorse(0,tblInvoice_ItMdt.HorseID,false)" _
& ",tblInvoice_Itmdt.HorseID.TotalAmount;"

lstModify.ColumnCount = 5
lstModify.ColumnWidths = "1 in;1 in;1 in;1.5 in;1 in"
lstModify.BoundColumn = 2

Bob,

1) Without a reference to the previous message, this post has no
relevance.
2) Other posters, who may have a similar need have no idea of what
this post is about.
3) I certainly don't keep past messages in mind, so to reply to this i
have to go back and forth to the previous message to refresh my
memory. It wastes time.

It is common courtesy to include the relevant portion of any previous
message when replying to a post, as I have with this message.

That being said....
4) I would expect, if the query is prompting you for a value for
tblInvoice_Itmdt.HorseID.TotalAmount, that you do not have a field in
the [tblInvoice_Itmdt] table with a name of [TotalAmount].
You'll have to check your table field names and data.

I just noticed this in your previous message:
lstModify.ColumnWidths = "1 in;1 in;1 in;1.5 in;1 in"<

The column width property should be written as:
1";1";1";1.5";1"
 
B

Bob V

fredg said:
Fred I am getting a enter parameter error on :
tblInvoice_Itmdt.HorseID.TotalAmount
And then it is only showing one record and the last column is empty!
Thanks For the help..............Bob

lstModify.RowSource = "SELECT Format(MIN(dtDate),'dd-mmm-yyyy') AS
StartDate," _
& " Format(MAX(dtDate),'dd-mmm-yyyy') AS EndDate," _
& "
tblInvoice_Itmdt.HorseID,funGetHorse(0,tblInvoice_Itmdt.HorseID,false)"
_
& " FROM tblInvoice_Itmdt" _
& " GROUP BY tblInvoice_Itmdt.HorseID" _
& " order by funGetHorse(0,tblInvoice_ItMdt.HorseID,true) "
_
& ",funGetHorse(0,tblInvoice_ItMdt.HorseID,false)" _
& ",tblInvoice_Itmdt.HorseID.TotalAmount;"

lstModify.ColumnCount = 5
lstModify.ColumnWidths = "1 in;1 in;1 in;1.5 in;1 in"
lstModify.BoundColumn = 2

Bob,

1) Without a reference to the previous message, this post has no
relevance.
2) Other posters, who may have a similar need have no idea of what
this post is about.
3) I certainly don't keep past messages in mind, so to reply to this i
have to go back and forth to the previous message to refresh my
memory. It wastes time.

It is common courtesy to include the relevant portion of any previous
message when replying to a post, as I have with this message.

That being said....
4) I would expect, if the query is prompting you for a value for
tblInvoice_Itmdt.HorseID.TotalAmount, that you do not have a field in
the [tblInvoice_Itmdt] table with a name of [TotalAmount].
You'll have to check your table field names and data.

I just noticed this in your previous message:
lstModify.ColumnWidths = "1 in;1 in;1 in;1.5 in;1 in"<

The column width property should be written as:
1";1";1";1.5";1"

Sorry Fred about the blank page!
This may help you and me, this is a code from another form that does list
the field TotalAmount...Thanks for the help..Bob

lstModify.RowSource = "SELECT tblInvoice_ItMdt.IntermediateID," _
& " tblInvoice_ItMdt.HorseID," _
& " funGetHorse(0,tblInvoice_ItMdt.HorseID,false) AS Name," _
& " tblInvoice_ItMdt.TotalAmount" _
& " FROM tblInvoice_ItMdt INNER JOIN tblHorseInfo" _
& " ON tblInvoice_ItMdt.HorseID=tblHorseInfo.HorseID" _
& " order by funGetHorse(0,tblInvoice_ItMdt.HorseID,true) " _
& ",funGetHorse(0,tblInvoice_ItMdt.HorseID,false);
 

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

Top