Hey guys, i know there are things out in the forums similar to this question, but i havent found anything similar to what i need help with. And any help would be much appreciated.
Ok, i have an option group(sortbybox) on the same form as 5 combo boxes. Based on the option selected in sortbybox certain comboboxes will be available for selection. Then, based on selections chosen by the user in the combo boxes, other selections will be limited in other combo boxes. Like In one combo i have states, based on the state chosen, the slection of schools are limited to that state. And based on the school chosen, the selection of grades are limited, and so forth. I have all that done, but what i want now is to have Default values set whenever i load the form, and whenever someone selects a different option, or combo selection, limiting the combo selections too. What i did before i had to synchronize my combos was taht i set the 'Bound Column' to 0. And i wrote this code:
If sortbybox = 1 Then
Combo48 = ""
Combo50 = 0
Combo52 = 0
Combo60 = 0
Combo62 = 0
Me!Combo48.Enabled = False
Me!Combo50.Enabled = True
Me!Combo52.Enabled = True
Me!Combo60.Enabled = True
Me!Combo62.Enabled = True
ElseIf sortbybox = 2 Then
Combo48 = 0
Combo50 = ""
Combo52 = 0
Combo60 = 0
Combo62 = 0
Me!Combo48.Enabled = True
Me!Combo50.Enabled = False
Me!Combo52.Enabled = True
Me!Combo60.Enabled = True
Me!Combo62.Enabled = True
ElseIf sortbybox = 3 Then
Combo48 = 0
Combo50 = 0
Combo52 = ""
Combo60 = 0
Combo62 = 0
Me!Combo48.Enabled = True
Me!Combo50.Enabled = True
Me!Combo52.Enabled = False
Me!Combo60.Enabled = True
Me!Combo62.Enabled = True
Else
Combo48 = 0
Combo50 = 0
Combo52 = 0
Combo60 = ""
Combo62 = ""
Me!Combo48.Enabled = True
Me!Combo50.Enabled = True
Me!Combo52.Enabled = True
Me!Combo60.Enabled = False
Me!Combo62.Enabled = False
End If
This code was setting the default values to 0. and Enabling certain combos. But now that i am synchronizing the combos, i HAVE to set the 'Bound Columns' to 1. This poses a problem now. If i use the same code, i end up with '0' (zero's) in my combo boxes. I want the selections to be there, so that they are limited, and everything. Is there any way to do this? If so please let me know.
And some things, that should not have been forgotten, were lost.
Ok, i have an option group(sortbybox) on the same form as 5 combo boxes. Based on the option selected in sortbybox certain comboboxes will be available for selection. Then, based on selections chosen by the user in the combo boxes, other selections will be limited in other combo boxes. Like In one combo i have states, based on the state chosen, the slection of schools are limited to that state. And based on the school chosen, the selection of grades are limited, and so forth. I have all that done, but what i want now is to have Default values set whenever i load the form, and whenever someone selects a different option, or combo selection, limiting the combo selections too. What i did before i had to synchronize my combos was taht i set the 'Bound Column' to 0. And i wrote this code:
If sortbybox = 1 Then
Combo48 = ""
Combo50 = 0
Combo52 = 0
Combo60 = 0
Combo62 = 0
Me!Combo48.Enabled = False
Me!Combo50.Enabled = True
Me!Combo52.Enabled = True
Me!Combo60.Enabled = True
Me!Combo62.Enabled = True
ElseIf sortbybox = 2 Then
Combo48 = 0
Combo50 = ""
Combo52 = 0
Combo60 = 0
Combo62 = 0
Me!Combo48.Enabled = True
Me!Combo50.Enabled = False
Me!Combo52.Enabled = True
Me!Combo60.Enabled = True
Me!Combo62.Enabled = True
ElseIf sortbybox = 3 Then
Combo48 = 0
Combo50 = 0
Combo52 = ""
Combo60 = 0
Combo62 = 0
Me!Combo48.Enabled = True
Me!Combo50.Enabled = True
Me!Combo52.Enabled = False
Me!Combo60.Enabled = True
Me!Combo62.Enabled = True
Else
Combo48 = 0
Combo50 = 0
Combo52 = 0
Combo60 = ""
Combo62 = ""
Me!Combo48.Enabled = True
Me!Combo50.Enabled = True
Me!Combo52.Enabled = True
Me!Combo60.Enabled = False
Me!Combo62.Enabled = False
End If
This code was setting the default values to 0. and Enabling certain combos. But now that i am synchronizing the combos, i HAVE to set the 'Bound Columns' to 1. This poses a problem now. If i use the same code, i end up with '0' (zero's) in my combo boxes. I want the selections to be there, so that they are limited, and everything. Is there any way to do this? If so please let me know.
And some things, that should not have been forgotten, were lost.