Getting references to comboxes in a form

StefanOl

Registered User.
Local time
Today, 10:27
Joined
Nov 11, 2009
Messages
15
Dear Sir or Madame

I have an form with a number of comboxes and I want
to store a reference to these comboxes so I can manipulate them
in various functions.

I have an array declared like this
Dim ProjectList(3, 11) As ComboBox


However ms asscess generates an error
"Run-time error '91':"
"Object variable or With block variable not set"

at the first assign line that looks like this
ProjectList(0, 0) = Me.Application0

Application0 is the name of the first combobox in the form.
The assignment line is "behind" a button so the form have been loaded
and rendered before I press the button.

How should I write the code so I can get a reference to the comboxes ?


Regards Stefan
 
Dear Sir

Thanks a lot for your tip, however I got it working by avoiding adressing
the combobox in a XXXX_BeforeUpdate function until everything have settled
by using a boolean flag, why it is so I do not know, but it works now

Regards
 

Users who are viewing this thread

Back
Top Bottom