קוד:
betweenWhere = "WHERE (shipers.dateship between #" & Me.fromdate & "# and #" & Me.todate & "#) and ("
theWhere = betweenWhere
theWhere = theWhere & "shipers.lakoah_code in ("
For Each Numtr In Me.רשימה0.ItemsSelected
theWhere = theWhere & Me.רשימה0.Column(0, Numtr) & ","
Next Numtr
theWhere = Left$(theWhere, Len(theWhere) - 1)
theWhere = theWhere & "))"
Me.sub_form_me.Form.RecordSource = "SELECT shipers.* FROM shipers " & theWhere & ";"