Detect "names" in combobox

Greyowlsl

Mlak Mlak
Local time
Today, 18:53
Joined
Oct 4, 2006
Messages
204
Hi,

Ok i have a combobox that has list of parts then i have some other text boxes that have the details of the part that is selected, now one of them is a combobox and shows the order priority, which contains 'major, minor, and critical'.

Now what i want to do is when i select a new record and invoke an onchange event that if order priority combobox shows critical that the forms back colour changes eg. Me.form.backcolor = vbred.

thanks,

Leon
 
Have a look at the attached sample ( I have converted it to 97)
 
Last edited:
Hey thanks heaps for your example,

I have converted it into my form:

Code:
Private Sub Combo197_AfterUpdate()
Combo197t
End Sub

Private Sub Combo197t()

    Select Case Combo197

        Case 1
            Forms(Me.Name).Section("Detail").BackColor = 16764057
        Case 2
            Forms(Me.Name).Section("Detail").BackColor = 12632256
        Case 3
            Forms(Me.Name).Section("Detail").BackColor = vbRed
        Case Else
            Forms(Me.Name).Section("Detail").BackColor = -2147483633
    End Select

End Sub

Private Sub Form_Current()
Combo197t
End Sub

now the problem is there is a type missmatch, and it is to do with the case's in particular, is there anything i have to change in the case commands to suit my form?

thanks again,

Leon
 
Here is a new sample based on your "names", works fine for me, I only did it to check if the error was in your naming I think that it will be in a missing reference open the form in design view and check the references.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom