Re: Multi Select list box and the bound column....
From: Douglas J. Steele (NOSPAM_djsteele_at_NOSPAM_canada.com)
Date: 03/16/04
- Next message: Christo Yssel: "Re: Database design"
- Previous message: PC Data***: "Re: Manual opening of files .mdb"
- In reply to: JP: "Multi Select list box and the bound column...."
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 16 Mar 2004 14:10:26 -0500
Already answered in another newsgroup to which you posted the same question.
If you feel you need to post to more than one group (HINT: it's seldom
necessary), please have the courtesy to cross-post (send the one message to
all groups at once), rather than multi-post (send individual messages to
each group). In this way, all responses to your post will be available
together, regardless of what group the responder was in, and the rest of us
won't have to read your post multiple times. (It also uses fewer server
resources)
If you're using Microsoft's web interface to post, please note that you can
type the names of the various groups into the Newsgroup box. Separate each
newsgroup name with a semicolon."
Note that it's generally consider to be A Bad Thing to cross-post to more
than about 2 or 3 newsgroups. (In fact, at
http://www.microsoft.com/presspass/features/2001/Mar01/Mar27pmvp.asp
Microsoft suggests that "One group will suffice")
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (No private e-mails, please) "JP" <anonymous@discussions.microsoft.com> wrote in message news:e25201c40b86$a5ea85b0$a301280a@phx.gbl... > Multi Select list box and the bound column.... > > Hello all, > Req any help with the following: > > I have a multi select list box that contains data from a > table. The table has two columns. Column 1 is a numerical > value, column two is text. > > When a user makes selections from the text (column 1) > displayed in the listbox, the numerical tally (column 2) > of those choices is displayed in a text box. The code for > which is as follows: > > Private Sub listBox_AfterUpdate() > Dim ctlList As Control, varItem As Variant > Dim a As Long > ' Return Control object variable pointing to list box. > Set ctlList = Me.listBox > ' Enumerate through selected items. > For Each varItem In ctlList.ItemsSelected > ' Print value of bound column. > 'Debug.Print ctlList.ItemData(varItem) > a = a + ctlList.ItemData(varItem) > Next varItem > 'Debug.Print a > TextBox.Value = a > End Sub > > My question is this: This appears to be the result of > column 1 (numerical values) being the bound column. Is > there anyway to make this happen with column 2 as the > bound column? The reason I ask, is because I need to keep > the tally feature, but also need to display the selected > text items in a combo box. > >
- Next message: Christo Yssel: "Re: Database design"
- Previous message: PC Data***: "Re: Manual opening of files .mdb"
- In reply to: JP: "Multi Select list box and the bound column...."
- Messages sorted by: [ date ] [ thread ]