After Update Event on Tab Stop set to NO (1 Viewer)

mtagliaferri

Registered User.
Local time
Today, 23:41
Joined
Jul 16, 2006
Messages
513
I have a form with a combo box that reads data from a table, I have the below code on the after update event which populates two more fields which populates if I scroll through with the tab, however if I set the Dep & Arr properties to tabs stop = no these fields do not update.

How can I overcome this and leaving the tab stop set to no?
 

theDBguy

I’m here to help
Local time
Today, 15:41
Joined
Oct 29, 2018
Messages
8,668
Hi. Are the other two fields actually unbound textboxes showing information from the other columns of the combobox? If so, try using an expression instead of the AfterUpdate event.
 

mtagliaferri

Registered User.
Local time
Today, 23:41
Joined
Jul 16, 2006
Messages
513
Hi. Are the other two fields actually unbound textboxes showing information from the other columns of the combobox? If so, try using an expression instead of the AfterUpdate event.
It is not unbound
 

The_Doc_Man

Happy Retired Curmudgeon
Local time
Today, 17:41
Joined
Feb 28, 2001
Messages
16,226
You referenced "the below code" but there was no code in your post.
 

mtagliaferri

Registered User.
Local time
Today, 23:41
Joined
Jul 16, 2006
Messages
513
You referenced "the below code" but there was no code in your post.
Sorry late reply I been off the grid for a while, the code is:

Code:
Private Sub LstFlightN_AfterUpdate()
    Me.Departure = Me.LstFlightN.Column(2)
    Me.Arrive = Me.LstFlightN.Column(3)
End Sub
 

The_Doc_Man

Happy Retired Curmudgeon
Local time
Today, 17:41
Joined
Feb 28, 2001
Messages
16,226
I want to be clear that we understand what you are saying.

You have Me.Departure.TabStop = NO and Me. Arrive.TabStop = NO. When you update Me.LstFlightN you want the Me.Departure and Me.Arrive controls (text boxes?) to be updated. You suggest that they do not update unless you set those two controls to .TapStop = YES. Is that your problem description?

If you could do so, set a breakpoint at the Me.Departure = line to see if the event actually fires in the case that you say is failing.

May I assume that the control LstFlightN is some sort of combo or list box? One thing you might try is to change that to the _Click event, which fires next in sequence after the _AfterUpdate event. To be honest, it would make absolutely no sense for a .TabStop on control A to interfere with the operation of control B unless there was something going in the _GotFocus or _LostFocus events.

Also, you suggest that those are actually bound controls. When you use VBA to assert a new value (as opposed to manual entry or update via navigation), the might not show up instantly but you can force it to show up by adding a Me.Repaint after the second line of that routine.

In summary, verify that the event fires in the conditions you describe AND try adding a Repaint AND if nothing else works, try changing to the Click event AND verify that nothing is going on in any Focus-related events.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom