OK forceflow . . . here we go . . .
[ol][li]Open [blue]popSelectProducts[/blue] in design view.[/li]
[li]Set the listbox [blue]Multi Select[/blue] property to [purple]
Extended[/purple].[/li]
[li]Add a [blue]Command Button[/blue] and copy/paste the following code to the [blue]OnClick[/blue] event.
Code:
[blue] Dim frm As Form, ctl As Control, idx, Build As String
Set frm = Forms!frmJobFiles
Set ctl = Me!lstProducts [green]'Popup Listbox Name[/green]
If ctl.ItemsSelected.Count > 0 Then
For Each idx In ctl.ItemsSelected
If Build <> "" Then
Build = Build & ";" & ctl.ItemData(idx)
Else
Build = ctl.ItemData(idx)
End If
Next
frm!lstProducts.RowSource = Build
frm!mmoProducts = Build
End If
Set ctl = Nothing
Set frm = Nothing[/blue]
[/li]
[li]Save & Close the form.[/li]
[li]Open [blue]frmJobFiles[/blue] in design view.[/li]
[li]Set the following [blue]properties[/blue] for [blue]lstProducts:[/blue]
[ol a][blue][li]Column Count [purple]
1[/purple][/li]
[li]Bound Column [purple]
1[/purple][/li]
[li]Row Source Type [purple]
Value List[/purple][/li]
[li]Row Source is [purple]
Empty/Blank[/purple][/li][/blue][/ol][/li]
[li]In the [blue]OnCurrent[/blue] event of the form, copy/paste the following"
Code:
[blue] If Trim(Me!mmoProducts & "") = "" Then
Me!lstProducts.RowSource = ""
Else
Me!lstProducts.RowSource = Me!mmoProducts
End If[/blue]
[/li][/ol]
The OnCurrent event [blue]updates the listbox when changing records.[/blue]
Thats it for the code.
When your satisified with the code, add two [blue]Labels[/blue] along side the listbox in the popup to explain multiselect. Example messages ([purple]hit Ctrl + Enter for new line[/purple]):
[ol][li]To make multiple indivisual selections:
hold Ctrl as you click.[/li]
[li]To select a range:
Select the first
Hold Shift & select the second.[/li][/ol]
See Ya! . . . . . .