Solved Bound control - Form level event for value change? (1 Viewer)

GUIDO22

Registered User.
Local time
Today, 00:07
Joined
Nov 2, 2003
Messages
515
I have a form with a collection of bound controls. By default, the form loads empty for new record entry but using the navigation buttons can browse historical records.
I have a text control bound to the primary key / ID for this form and if this is NOT NULL ie. an existing record, I wish to run some code...

I thought I could use the Form_Current() event to achieve this, but it seems the current event fires before the controls have populated from the source table...

Thanks in advance
 

GUIDO22

Registered User.
Local time
Today, 00:07
Joined
Nov 2, 2003
Messages
515
  • Move the focus to another record:
    BeforeUpdate (form)
    arrow
    AfterUpdate (form)
    arrow
    Exit (control2)
    arrow
    LostFocus (control2)
    arrow
    Current (form)
    But when I put a breakpoint in the current event and move focus to an existing record- inspecting the bound control value, value is NULL 🤔
 

GUIDO22

Registered User.
Local time
Today, 00:07
Joined
Nov 2, 2003
Messages
515
  • Move the focus to another record:
    BeforeUpdate (form)
    arrow
    AfterUpdate (form)
    arrow
    Exit (control2)
    arrow
    LostFocus (control2)
    arrow
    Current (form)

    But when I put a breakpoint in the current event and move focus to an existing record- inspecting the bound control value, value is NULL 🤔
=======================================
Update:
I have moved the call to my routine to the very bottom of the Current event() and it is now working.. cant see why at present.....
 

Users who are viewing this thread

Top Bottom