Actually I am a beginner with MS Access and want to make my own data base for my patients (as I am Surgeon by profession). I explain you my new query...
Suppose we have two bound combo boxes, "PositiveGPE_Finding" and "Lymphnode_Gp" respectively, in same form named "History". "PositiveGPE_Finding" combo box have value list with Multiple Selection enabled and Values; Pallor, Jaundice, Cyanosis, Lymph Nodes. Combo box "Lymphnode_Gp" has its own values. Is it possible that "Lymphnode_Gp" combo box is only enabled when 'Lmph Node' value is checked in "PositiveGPE_Finding" combo box.....
I have tried using 'ItemData' and 'Selected' properties of combo box but could not succeed....
I tried this code in the AfterUpdate()event of cbo PositiveGPE_Findings but it didn't work as well...
Expand|Select|Wrap|Line Numbers
- Private Sub PositiveGPE_Findings_AfterUpdate()
- Dim varItem As Variant
- Dim ctl As Control
- Set ctl = Me![PositiveGPE_Findings]
- If ctl.ItemsSelected.Count = 0 Then Exit Sub
- For Each varItem In ctl.ItemsSelected
- Me![Lymphnode_GP].Enabled = (ctl.ItemData(varItem) = "Lymph Node")
- Next
- End Sub