PC Review


Reply
Thread Tools Rate Thread

Adding a new column to a List Box!

 
 
Bob V
Guest
Posts: n/a
 
      29th Oct 2007

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



 
Reply With Quote
 
 
 
 
fredg
Guest
Posts: n/a
 
      29th Oct 2007
On Tue, 30 Oct 2007 10:43:09 +1300, Bob V wrote:

> 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.

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
 
Reply With Quote
 
Bob V
Guest
Posts: n/a
 
      30th Oct 2007
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


 
Reply With Quote
 
fredg
Guest
Posts: n/a
 
      30th Oct 2007
On Wed, 31 Oct 2007 10:25:46 +1300, Bob V wrote:

> 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.

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
 
Reply With Quote
 
fredg
Guest
Posts: n/a
 
      30th Oct 2007
On Tue, 30 Oct 2007 14:40:42 -0700, fredg wrote:

> On Wed, 31 Oct 2007 10:25:46 +1300, Bob V wrote:
>
>> 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"

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
 
Reply With Quote
 
Bob V
Guest
Posts: n/a
 
      30th Oct 2007

"fredg" <(E-Mail Removed)> wrote in message
news:1k7zt7s5hefzj.8e22b8lpidxk$.(E-Mail Removed)...
> On Tue, 30 Oct 2007 14:40:42 -0700, fredg wrote:
>
>> On Wed, 31 Oct 2007 10:25:46 +1300, Bob V wrote:
>>
>>> 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"
>
> --
> Fred
> Please respond only to this newsgroup.
> I do not reply to personal e-mail


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);


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a -L to the end of a list of numbers in a column. Jim S Microsoft Excel New Users 3 20th Jul 2009 11:37 PM
Adding a -L to a list of numbers in a column, how to do this? Jim S Microsoft Excel Misc 3 20th Jul 2009 11:33 PM
Adding a Drop Down List to a Column? =?Utf-8?B?U3RhY3k=?= Microsoft Excel Worksheet Functions 1 30th Jun 2005 04:49 PM
Column Views in Task List - Adding & Displaying =?Utf-8?B?Q2hyaXMgQmxha2U=?= Microsoft Outlook Contacts 1 19th Apr 2004 09:21 PM
Adding items to the second column of a list box mika Microsoft Excel Programming 3 25th Nov 2003 12:05 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:01 AM.