When do Controls become live?

  • Thread starter Thread starter Alain
  • Start date Start date
A

Alain

Hi,

Access 2000.

I have a tabbed notebook on the main form. When I initialize the data at
startup, I notice that a control is NULL for quite a while. WHEN do
controls get instantiated (or get a value)?

Thanks.
 
Alain said:
Hi,

Access 2000.

I have a tabbed notebook on the main form. When I initialize the data at
startup, I notice that a control is NULL for quite a while. WHEN do
controls get instantiated (or get a value)?

My understanding was that by the time the Load event is running all the controls
should have their values set from the RecordSet.
 
Hi Rick,

Thanks for your answer.

The point is not about data loading; it is that the Control's value is NULL (it does
not exist) so that I cannot refer to any of its properties

Statement : if IsNull(MyComboBox) returns True at startup. So that MyComboBox.Text,
for example, generates an error.

My question was: until WHEN? At what point is MyComboBox (and all controls) NOT
NULL?

Have a good day.

Alain

Rick Brandt a écrit :
 
Hi Rick,

Thanks for your answer.

The point is not about data loading; it is that the Control's value is NULL (it does
not exist) so that I cannot refer to any of its properties

Statement : if IsNull(MyComboBox) returns True at startup. So that MyComboBox.Text,
for example, generates an error.

My question was: until WHEN? At what point is MyComboBox (and all controls) NOT
NULL?

That is what I was addressing. My understanding is that by the time you get to the
load event you should be able to test the value of all bound controls. If you cannot
then something else is going on.
 
Alain -

In VBA, the .Text property is not available for a control unless the control
has the focus. Use the .Value property instead.

--
Ken Snell
<MS ACCESS MVP>

Hi Rick,

Thanks for your answer.

The point is not about data loading; it is that the Control's value is NULL
(it does
not exist) so that I cannot refer to any of its properties

Statement : if IsNull(MyComboBox) returns True at startup. So that
MyComboBox.Text,
for example, generates an error.

My question was: until WHEN? At what point is MyComboBox (and all controls)
NOT
NULL?

Have a good day.

Alain

Rick Brandt a écrit :
 
Back
Top