Hello All,
I am trying to limit the items in a combo box on a form based on what has been selected in another combo box. I have this part working using some code in the AfterUpdate. What I'm now trying to do is limit the items further by only show items that have a 1 or 2 immediately after the decimal point.
For example, I have sections labeled 1 through 11. If I select section 1, I only want to see sub-sections 1.1a, 1.1b, etc. There are also sub-sections labeled 1.2a. I don't want to see those yet. (I have 2 forms, one will show sub section 1.1a, et al and the other will show the 1.2's).
The line of code that makes the SQL statement to limit the sub-sections is:
What do I need to add to limit the sub-sections to 1 or 2 as needed?
Thanks, in advanced, for your help!
I am trying to limit the items in a combo box on a form based on what has been selected in another combo box. I have this part working using some code in the AfterUpdate. What I'm now trying to do is limit the items further by only show items that have a 1 or 2 immediately after the decimal point.
For example, I have sections labeled 1 through 11. If I select section 1, I only want to see sub-sections 1.1a, 1.1b, etc. There are also sub-sections labeled 1.2a. I don't want to see those yet. (I have 2 forms, one will show sub section 1.1a, et al and the other will show the 1.2's).
The line of code that makes the SQL statement to limit the sub-sections is:
Code:
sCategory = "SELECT [sub_sections].[id], " & _
" [sub_sections].[sub-section_name] " & _
"FROM sub_sections " & _
"WHERE [section] = """ & Me.Section_Num.Value & """"
What do I need to add to limit the sub-sections to 1 or 2 as needed?
Thanks, in advanced, for your help!