keek2a4
03-05-2008, 04:42 AM
Hi,
I have a dropdown list that queries a table and displays the dropdown list on the form. I want to write a vba code that based on
the selection the user makes on the dropdown, it disables some text fields on the form, so user cannot enter a value.
I am thinking of using a After event procedure and my logic is
If me.comboBoxName.count = 1 Then ' how can I write what value is selected from the dropdown
me.textfield1.disable = true
me.textfield2.disable = true
End If
Is there a better way of doing it? I am not too sure on the correct syntax on this one. Please help!
Thanks,
I have a dropdown list that queries a table and displays the dropdown list on the form. I want to write a vba code that based on
the selection the user makes on the dropdown, it disables some text fields on the form, so user cannot enter a value.
I am thinking of using a After event procedure and my logic is
If me.comboBoxName.count = 1 Then ' how can I write what value is selected from the dropdown
me.textfield1.disable = true
me.textfield2.disable = true
End If
Is there a better way of doing it? I am not too sure on the correct syntax on this one. Please help!
Thanks,