ComboBox, sos, deadline 2 days away

ECLAIM

Registered User.
Local time
Today, 17:56
Joined
Feb 6, 2002
Messages
10
I have a form designed for survey result data entry, it consists of sets of comboboxes, which corresponds to possible answers from quetionnaire.

I want to disable other comboxes if one of the possible answers has been entered, and should be able to re-enable it should the data entry clark makes a mistake and needs to change the response
Example
4 comboboxes each consist of possible response to a question. If cmb1 contains a value disable cmb2,cmb3,cmb4. If user decides to change response by deleting value in cmb1,re-enable remaining three.

I have tried code in the AfterUpdate event,OnChange and even form current, it doesn't accurately cut it.

Why comboboxes when text box could do? It was part of application requirement from the project sponsors.

Any assistance would be greately appriciated
 
I have the same thing in a database i'm currently creating, I use one of the following ways to disable a box

If Me!ComboBox1 = "Test" then
Me!ComboBox2.enabled = false
elseif Me!Combobox1 = "Test1" then
Me!ComboBox2.enabled = False
else
Me!ComboBox2.enabled = True
EndIf

Or use

Select Case Me!ComboBox1
Case "Test"
Me!ComboBox2.enabled = false
Case "Test1"
Me!ComboBox2.enabled = False
Caes Else
Me!ComboBox2.enabled = True
End Select

I set it on after update

[This message has been edited by Geoff Codd (edited 03-27-2002).]
 
Thanks Geoff Codd for your response.Your example was very similar to the way I had my codes before.

Afterupdate of one combobox the rest of the comboboxes get disabled which is fine, However if I decide to delete the value, that is make it null on the form, I want the rest turned back on, but this doesn't happen. I guess you can't cancel an Afterupdate event.

This is just to allow for correction should the data entry clark enters the wrong response and needs to change it.
 
How about using the "on click" or "on double click" property of your combo box. You can code it in such a way that when the user clicks or double clicks the "filled-in" combo box, you enable your other combo boxes and set the value of the combo box just clicked to null ?

Let me know if this helps.
 
It may be worth checking the data in the table. Sometimes when you delete a value in a combo you get a zero stored in the field. Usually a default setting on the table which you could take out. The code should work but you may need it in two places, after update on the combo box and on current on the form to give the correct results when you go to a new record.

It may also be worth checking to see if you have left an empty string in the combo when you have deleted the entry.

HTH
John

[This message has been edited by John.Woody (edited 03-31-2002).]
 

Users who are viewing this thread

Back
Top Bottom