ok currently at work im working on a job that has vb script inside of access. My problem is what im trying to do is set it up so i can actually put a time into it and it for to search avail cubes to seat someone as apose to showing all of the cubes. does that make sense? if anyone could help this is what i have so far! thanks in advance.
Code:Private Sub cmd_RunSTF_Click()
Dim i As Integer
Dim x As Integer
lblTitle.Caption = "Cubes With No Agent Assigned from """ & txt_fsSegStart.Value & """ To """ & txt_fsSegEnd.Value & """"
ResetCube
List880.RowSource = "SELECT tbl_Temp_Assigned_Agent.[Cube ID], tbl_Temp_Assigned_Agent.[Shift Start], tbl_Temp_Assigned_Agent.[Shift End] FROM tbl_Temp_Assigned_Agent WHERE (((tbl_Temp_Assigned_Agent.[Shift Start])<" & txt_fsSegStart & ") AND ((tbl_Temp_Assigned_Agent.[Shift End])>" & txt_fsSegEnd & "));"
For i = 0 To Form.List880.ListCount - 1
For x = 0 To Form.Controls.Count - 1
ObjectName = Form(x).Name
If ObjectName = "lbl_" & List880.ItemData(i) Then
Form(x).BackColor = 8215296
Form(x).ForeColor = 16777215
End If
Next
Next
txt_fsSegStart.Value = ""
txt_fsSegEnd.Value = ""
End Sub
