G
Guest
Hi,
I am trying to filter or limit the contents of one combo/list box based on
the selection from another combo/list box. Both are on the same form and use
different rowsource types and row sources.
I have been trying to use the following procedure, but continue to get the
following error:
Runtime error:
Object doesn't support this property or method
Here is the code:
Me![Service procedure].RowSource = "SELECT Code,Description, [Staff Level
1], " & _
"[Staff Level 2], [Staff Level 3], [Staff Level 4], [Staff Level 5] "
& _
"FROM [Service Procs] " & _
"WHERE ([Staff Level 1]=" & Me![Service By Drop Down].Column(2) & ") OR
" & _
"([Staff Level 2]=" & Me![Service By Drop Down].Column(2) & ") OR " & _
"([Staff Level 3]=" & Me![Service By Drop Down].Column(2) & ") OR " & _
"([Staff Level 4]=" & Me![Service By Drop Down].Column(2) & ") OR " & _
"([Staff Level 5]=" & Me![Service By Drop Down].Column(2) & ") " & _
"ORDER BY Code"
I tried the following suggestion to remedy the error, but it has not worked.
If code breaks on this statement again then, in immediate window (<Ctrl> +
<G>), run the statements
?Me![Service procedure].Name
?Me![Service By Drop Down].Column(2)
Any additional help or suggestions would be greatly appreciated.
I am trying to filter or limit the contents of one combo/list box based on
the selection from another combo/list box. Both are on the same form and use
different rowsource types and row sources.
I have been trying to use the following procedure, but continue to get the
following error:
Runtime error:
Object doesn't support this property or method
Here is the code:
Me![Service procedure].RowSource = "SELECT Code,Description, [Staff Level
1], " & _
"[Staff Level 2], [Staff Level 3], [Staff Level 4], [Staff Level 5] "
& _
"FROM [Service Procs] " & _
"WHERE ([Staff Level 1]=" & Me![Service By Drop Down].Column(2) & ") OR
" & _
"([Staff Level 2]=" & Me![Service By Drop Down].Column(2) & ") OR " & _
"([Staff Level 3]=" & Me![Service By Drop Down].Column(2) & ") OR " & _
"([Staff Level 4]=" & Me![Service By Drop Down].Column(2) & ") OR " & _
"([Staff Level 5]=" & Me![Service By Drop Down].Column(2) & ") " & _
"ORDER BY Code"
I tried the following suggestion to remedy the error, but it has not worked.
If code breaks on this statement again then, in immediate window (<Ctrl> +
<G>), run the statements
?Me![Service procedure].Name
?Me![Service By Drop Down].Column(2)
Any additional help or suggestions would be greatly appreciated.