OnClick Issue

alnilla

Registered User.
Local time
Today, 12:00
Joined
Jul 19, 2012
Messages
39
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
 
Try the after update event rather than the click event.
 
Try the after update event of Me.PEID or the got focus event of the combo box
 
Thank you the On Got Focus one worked! Is there a website with examples of when to use these?

Thank you!!
Paul
 

Users who are viewing this thread

Back
Top Bottom