L
laavista
I’m using Access 2003. I have a list box (called ListRecruiters) in the
detail section of the form. The list box displays the correct values, but
it does not allow anything to be selected.
Row source is: SELECT DISTINCT t_MilitaryBase.Recruiter FROM
t_MilitaryBase UNION select "All" from t_MilitaryBase;
Row Source Type: Table/Query
Bound Column 1
Allow value list edits No (I’ve tried yes)
Inherit value list no
Show only row source value no
Enabled yes
Locked no
The values in the list box are correct so I’m assuming the row source is OK.
When a command button is clicked, I call a procedure. Part of it follows:
Dim strIN As String
Set MyDB = CurrentDb()
strSQL = "SELECT * FROM t_MilitaryBase"
'Build the IN string by looping through the listbox
For i = 0 To ListRecruiters.ListCount - 1
If ListRecruiters.Selected(i) Then
If ListRecruiters.Column(0, i) = "All" Then
flgSelectAll = True
End If
strIN = strIN & "'" & ListRecruiters.Column(0, i) & "',"
End If
Next i
Your help would be greatly appreciated!
detail section of the form. The list box displays the correct values, but
it does not allow anything to be selected.
Row source is: SELECT DISTINCT t_MilitaryBase.Recruiter FROM
t_MilitaryBase UNION select "All" from t_MilitaryBase;
Row Source Type: Table/Query
Bound Column 1
Allow value list edits No (I’ve tried yes)
Inherit value list no
Show only row source value no
Enabled yes
Locked no
The values in the list box are correct so I’m assuming the row source is OK.
When a command button is clicked, I call a procedure. Part of it follows:
Dim strIN As String
Set MyDB = CurrentDb()
strSQL = "SELECT * FROM t_MilitaryBase"
'Build the IN string by looping through the listbox
For i = 0 To ListRecruiters.ListCount - 1
If ListRecruiters.Selected(i) Then
If ListRecruiters.Column(0, i) = "All" Then
flgSelectAll = True
End If
strIN = strIN & "'" & ListRecruiters.Column(0, i) & "',"
End If
Next i
Your help would be greatly appreciated!