Multi Select Listbox (1 Viewer)

Dreamweaver

Well-known member
Local time
Today, 10:28
Joined
Nov 28, 2005
Messages
2,466
Hi I have a need to get 2 colums from a listbox I can get one as below


Code:
            For Each VarNum In lstDiary.ItemsSelected
                'Send ID To Be Updated
            UpdateDiary lstDiary.ItemData(VarNum)
            Next
But I need to access the next colum which contains another lookup list ID which I can then check if it's in use on a selected date by a selected employees before I allow said item to be updated


I use this to tell me how many entries have been found but I need to check each time slot as they may be different


Code:
If Me![lstMoveTo].ListCount <> 0 Then
    Me![lstCount] = Me![lstMoveTo].ListCount & " Records Have Been Found for the selected date/Employee"
End If
Thanks
 

Dreamweaver

Well-known member
Local time
Today, 10:28
Joined
Nov 28, 2005
Messages
2,466
Thanks got it all working nicely now, I didn't want to leave it so if any slots were found they couldn't move any but now if they want to move 2 slots if those 2 selected slots are free on the date they can be moved I even provided a list to show whats available on the selected date and for selected employee if moving slots to another employe.


P.S. Did check the help site but didn't find what you found.
thanks, going to bookmark that set of pages
 

Attachments

  • 2018-12-27.png
    2018-12-27.png
    67.8 KB · Views: 57

Ranman256

Well-known member
Local time
Today, 05:28
Joined
Apr 9, 2015
Messages
4,337
instead of multiselect list box, use a single listbox to add to a 'picked' table.
dbl-click runs append query to add item to the tPicked.
then the date check is just a query to validate.

pick list.png
 

Dreamweaver

Well-known member
Local time
Today, 10:28
Joined
Nov 28, 2005
Messages
2,466

Users who are viewing this thread

Top Bottom