Prev: Screen Refresh failure
Next: Label printing in VB6
From: David on 15 Apr 2010 19:38 Form1: I have a flexgrid where I show Form2 when a combobox is clicked. (BTW, I use a keypress instead of subclassing for the mouse since this is an issue with the combobox.) Form 2: Receives the combo.text in a lookup textbox on Form2 that finds the text in Form2's listbox (using the combobox.text) and loads the required controls with the correct information. All works well. If I have multiple vendors with the same name -- because of different locations (e.g. GE which has multiple offices) they appear multiple times within Form2's listbox. It is up to the user to distinquish the location based on the address when dealing with Form 2. ======= PROBLEM ========= When passing the Combobox text X-Form, there is No way to distinquish as company names (e.g GE) are not unique. Other than adding a prefix or suffix to the name to make each location unique -- anyone have any suggestions on another way to approach this? Thanks David
From: Larry Serflaten on 15 Apr 2010 22:36 "David" <NoWhere(a)earthlink.net> wrote > ======= PROBLEM ========= > > When passing the Combobox text X-Form, there is No way to distinquish as > company names (e.g GE) are not unique. > > Other than adding a prefix or suffix to the name to make each location > unique -- anyone have any suggestions on another way to approach this? The obvious answer is that you need more data to identify the individual items. The combobox's ItemData comes to mind where you can associate some integer value to each item in the combo list. LFS
From: Bee on 15 Apr 2010 21:57 delete listbox use listview in report mode. use .text only use a tooltip per row Dim itmX As ListItem ListView1.View = lvwReport ListView1.ColumnHeaders.Add , , "" ListView1.HideColumnHeaders = True ListView1.ColumnHeaders(1).Width = Me.Width ' the first row Set itmX = ListView1.ListItems.Add(, , "Your Text1") itmX.ToolTipText = "A Tooltip1" ' the next Set itmX = ListView1.ListItems.Add(, , "Your Text2") itmX.ToolTipText = "A Tooltip2" and so on "David" wrote: > Form1: > I have a flexgrid where I show Form2 when a combobox is clicked. > (BTW, I use a keypress instead of subclassing for the mouse since this is an > issue with the combobox.) > > Form 2: > Receives the combo.text in a lookup textbox on Form2 that > finds the text in Form2's listbox (using the combobox.text) and loads the > required controls with the correct information. > > All works well. > > If I have multiple vendors with the same name -- because of different > locations (e.g. GE which has multiple offices) they appear multiple times > within Form2's listbox. It is up to the user to distinquish the location > based on the address when dealing with Form 2. > > ======= PROBLEM ========= > > When passing the Combobox text X-Form, there is No way to distinquish as > company names (e.g GE) are not unique. > > Other than adding a prefix or suffix to the name to make each location > unique -- anyone have any suggestions on another way to approach this? > > Thanks > > David > > > . >
From: David on 15 Apr 2010 22:10 Bee Thanks for responding. Will give some thought to a listview. See LFS post (following) as he's hit on the "key" issue. "Bee" <Bee(a)discussions.microsoft.com> wrote in message news:389576E8-C9A4-4450-A0E7-806CE0DB86FC(a)microsoft.com... > delete listbox > > use listview in report mode. > use .text only > use a tooltip per row > > Dim itmX As ListItem > > ListView1.View = lvwReport > ListView1.ColumnHeaders.Add , , "" > ListView1.HideColumnHeaders = True > ListView1.ColumnHeaders(1).Width = Me.Width > > ' the first row > Set itmX = ListView1.ListItems.Add(, , "Your Text1") > itmX.ToolTipText = "A Tooltip1" > > ' the next > Set itmX = ListView1.ListItems.Add(, , "Your Text2") > itmX.ToolTipText = "A Tooltip2" > > and so on > > "David" wrote: > >> Form1: >> I have a flexgrid where I show Form2 when a combobox is clicked. >> (BTW, I use a keypress instead of subclassing for the mouse since this is >> an >> issue with the combobox.) >> >> Form 2: >> Receives the combo.text in a lookup textbox on Form2 that >> finds the text in Form2's listbox (using the combobox.text) and loads >> the >> required controls with the correct information. >> >> All works well. >> >> If I have multiple vendors with the same name -- because of different >> locations (e.g. GE which has multiple offices) they appear multiple >> times >> within Form2's listbox. It is up to the user to distinquish the location >> based on the address when dealing with Form 2. >> >> ======= PROBLEM ========= >> >> When passing the Combobox text X-Form, there is No way to distinquish >> as >> company names (e.g GE) are not unique. >> >> Other than adding a prefix or suffix to the name to make each location >> unique -- anyone have any suggestions on another way to approach this? >> >> Thanks >> >> David >> >> >> . >>
From: David on 15 Apr 2010 22:15 LFS: Thanks for responding. Good Idea. The combo does have the DBRcdID in ItemData. Was passing text (the company name) as easy entry into the lookup text box in Form2. I use ItemData elsewhere in Form1 to save combo results to DB, but overlooked it for XForm usage. Will check it out. Have a nice day. David "Larry Serflaten" <serflaten(a)usinternet.com> wrote in message news:uCc1GUQ3KHA.5084(a)TK2MSFTNGP02.phx.gbl... > > "David" <NoWhere(a)earthlink.net> wrote >> ======= PROBLEM ========= >> >> When passing the Combobox text X-Form, there is No way to distinquish >> as >> company names (e.g GE) are not unique. >> >> Other than adding a prefix or suffix to the name to make each location >> unique -- anyone have any suggestions on another way to approach this? > > > The obvious answer is that you need more data to identify the individual > items. The combobox's ItemData comes to mind where you can associate > some integer value to each item in the combo list. > > LFS > >
|
Pages: 1 Prev: Screen Refresh failure Next: Label printing in VB6 |