Hi Guys,
I am having an issue with onclick on a combo box. What I am trying to do is set a query based off of another Field Value. That value as you see is PEID. This works but only after the click not before.
Example, I go and select a value any value doesn't matter if its in SL1 or SLB when I go to select it again the code worked. I can only choose the correct one.
What I want to happen is on click it sees what value is in the PEID and then chooses the right lookup query to chose from.
Thank you!
Private Sub SLSpeed_Click()
If Me.PEID = "SL1" Then
SLSpeed.RowSource = "qryLookupSLSpeedSL1"
End If
If Me.PEID = "SLB" Then
SLSpeed.RowSource = "qryLookupSLSpeedSLB"
End If
End Sub
I am having an issue with onclick on a combo box. What I am trying to do is set a query based off of another Field Value. That value as you see is PEID. This works but only after the click not before.
Example, I go and select a value any value doesn't matter if its in SL1 or SLB when I go to select it again the code worked. I can only choose the correct one.
What I want to happen is on click it sees what value is in the PEID and then chooses the right lookup query to chose from.
Thank you!
Private Sub SLSpeed_Click()
If Me.PEID = "SL1" Then
SLSpeed.RowSource = "qryLookupSLSpeedSL1"
End If
If Me.PEID = "SLB" Then
SLSpeed.RowSource = "qryLookupSLSpeedSLB"
End If
End Sub