Hi all,
I have a ListBox that has a two options for it's RowSource. This is based on the users login ID (based on the value of a text box on the form) and is used to hide records from certain users. The records displayed in the ListBox can be double clicked and loads a form with record details.
I use the following code to identify which RowSource to load:
Private Sub Form_Open(Cancel As Integer)
If Me.TextBox.Value = "Boss" Or Me.TextBox.Value = "Admin" Then
Me.ListBox.RowSource = "qryDynamicSearch"
Else
Me.ListBox.RowSource = "qryDynamicSearchRestricted"
End If
End Sub
I would like to sort the records displayed by column and I have found a great solution in the following sample database that does exactly what I want but I don't know how to apply it without losing the option of multiple Row Sources (based on user login ID).
'access-programmers.co.uk/forums/showthread.php?t=109525
I'm afraid if I use SQL I won't be able to control the Row Source.
Is there a way to replicate the sample database in the above link without using SQL?
I have a ListBox that has a two options for it's RowSource. This is based on the users login ID (based on the value of a text box on the form) and is used to hide records from certain users. The records displayed in the ListBox can be double clicked and loads a form with record details.
I use the following code to identify which RowSource to load:
Private Sub Form_Open(Cancel As Integer)
If Me.TextBox.Value = "Boss" Or Me.TextBox.Value = "Admin" Then
Me.ListBox.RowSource = "qryDynamicSearch"
Else
Me.ListBox.RowSource = "qryDynamicSearchRestricted"
End If
End Sub
I would like to sort the records displayed by column and I have found a great solution in the following sample database that does exactly what I want but I don't know how to apply it without losing the option of multiple Row Sources (based on user login ID).
'access-programmers.co.uk/forums/showthread.php?t=109525
I'm afraid if I use SQL I won't be able to control the Row Source.
Is there a way to replicate the sample database in the above link without using SQL?