self_teachin01
03-07-2005, 03:44 PM
Hello again!
I'm working on a new challenge and am quite stumped. I've done extensive research but haven't been able to make anything I've found actually work.
I need to target a user-selected record from a multi-column list box (single selection only) and command a separate form (opened elsewhere in the event procedure) to display a record containing a control containing a value matching the value of one column of the user-selected record in the list box. Crucially, I don't want the newly opened form to display ONLY that record, but simply to begin showing that record within its standard available recordset. Thus I can't use a WHERE condition on the OpenForm SQL statement.
I have been messing around with ItemData and the ItemsSelected Array, but am totally lost on how to specify a single column within ItemData. Furthermore, the whole thing was meant for multi-selection in a List Box, so I know it doesn't have to be this complex.
you'd think the answer would be something as simple as
Forms![Form Y].CtrlA.Value = Me.[ListBoxA].Column([#]), but this flatly refuses to work. "Column" doesn't even come up as a possible extension of Me.[ListBoxA] in the AutoComplete area, despite VB Help claiming you can use it for this purpose.
My List Box isn't bound to a table field. Logically, it shouldn't have to be - this is only a selection dialog bog and the currently selected item is always the only one that matters.
So, can someone show me an example of how this should work? "This" meaning specifying a single column of a selected record in a list box, and then passing that data to another form? Note that my openargs property is being used by something else and therefore this is not an option (unless you want to show me how to concatenate, and, more to the point, unconcatenate, which never works for me).
I'd post code, but I have nothing but lemons. I could post the lemons if it was really helpful.
I'm working on a new challenge and am quite stumped. I've done extensive research but haven't been able to make anything I've found actually work.
I need to target a user-selected record from a multi-column list box (single selection only) and command a separate form (opened elsewhere in the event procedure) to display a record containing a control containing a value matching the value of one column of the user-selected record in the list box. Crucially, I don't want the newly opened form to display ONLY that record, but simply to begin showing that record within its standard available recordset. Thus I can't use a WHERE condition on the OpenForm SQL statement.
I have been messing around with ItemData and the ItemsSelected Array, but am totally lost on how to specify a single column within ItemData. Furthermore, the whole thing was meant for multi-selection in a List Box, so I know it doesn't have to be this complex.
you'd think the answer would be something as simple as
Forms![Form Y].CtrlA.Value = Me.[ListBoxA].Column([#]), but this flatly refuses to work. "Column" doesn't even come up as a possible extension of Me.[ListBoxA] in the AutoComplete area, despite VB Help claiming you can use it for this purpose.
My List Box isn't bound to a table field. Logically, it shouldn't have to be - this is only a selection dialog bog and the currently selected item is always the only one that matters.
So, can someone show me an example of how this should work? "This" meaning specifying a single column of a selected record in a list box, and then passing that data to another form? Note that my openargs property is being used by something else and therefore this is not an option (unless you want to show me how to concatenate, and, more to the point, unconcatenate, which never works for me).
I'd post code, but I have nothing but lemons. I could post the lemons if it was really helpful.