ComboBox Custom Fill Functions 
Author Message
 ComboBox Custom Fill Functions

Hi,

I've been using functions in the RowSourceType property of combox boxes
in order to add extra rows such as <All> and <None> to the list. (There
is an example in the Solutions database that comes with Access).

The problem is, it would seem you can only have one control calling such
a function at a time as it uses static vars.

I've put this function in a library database which will reside on a
server and there could be up to 10 users all clicking combo boxes at the
same time. Does this mean it will fail, and if so is there a solution?

Should I just duplicate the custom fill function code into every client
database? Seems a bit inefficient...

Alternatively, would it make more sense to use an ActiveX combo instead?

--
Gerry Hickman (London UK)
http://www.*-*-*.com/



Tue, 26 Nov 2002 03:00:00 GMT  
 ComboBox Custom Fill Functions
to add <all> or <none> to the list of a combo or listbox, look at this
website:

http://www.mvps.org/access/forms/frm0043.htm

Quote:

> Hi,

> I've been using functions in the RowSourceType property of combox boxes
> in order to add extra rows such as <All> and <None> to the list. (There
> is an example in the Solutions database that comes with Access).

> The problem is, it would seem you can only have one control calling such
> a function at a time as it uses static vars.

> I've put this function in a library database which will reside on a
> server and there could be up to 10 users all clicking combo boxes at the
> same time. Does this mean it will fail, and if so is there a solution?

> Should I just duplicate the custom fill function code into every client
> database? Seems a bit inefficient...

> Alternatively, would it make more sense to use an ActiveX combo instead?

> --
> Gerry Hickman (London UK)
> http://www.gerry1.dircon.co.uk/



Tue, 26 Nov 2002 03:00:00 GMT  
 ComboBox Custom Fill Functions
Hello Ngan,

Quote:
> to add <all> or <none> to the list of a combo or listbox, look at this
> website:

> http://www.mvps.org/access/forms/frm0043.htm

The union query is an interesting idea, Thanks.

I would still, however, like the know more about the use of the callback
function with regard to multi-user client/server implementations.

--
Gerry Hickman (London UK)
http://www.gerry1.dircon.co.uk/



Tue, 26 Nov 2002 03:00:00 GMT  
 ComboBox Custom Fill Functions
Gerry:
The values of variables are stored locally in the machine that is running
the code (each machine would have its own instance of code running in its
own memory). This problem would only occur in the way you have already
experienced it.

--
Bruce M. Thompson


Quote:
> Hi,

> I've been using functions in the RowSourceType property of combox boxes
> in order to add extra rows such as <All> and <None> to the list. (There
> is an example in the Solutions database that comes with Access).

> The problem is, it would seem you can only have one control calling such
> a function at a time as it uses static vars.

> I've put this function in a library database which will reside on a
> server and there could be up to 10 users all clicking combo boxes at the
> same time. Does this mean it will fail, and if so is there a solution?

> Should I just duplicate the custom fill function code into every client
> database? Seems a bit inefficient...

> Alternatively, would it make more sense to use an ActiveX combo instead?

> --
> Gerry Hickman (London UK)
> http://www.gerry1.dircon.co.uk/



Wed, 27 Nov 2002 03:00:00 GMT  
 ComboBox Custom Fill Functions
Hello Bruce,

Quote:
> The values of variables are stored locally in the machine that is running
> the code (each machine would have its own instance of code running in its
> own memory). This problem would only occur in the way you have already
> experienced it.

Ah! Of course.

So it's not as bad as I thought :)

What do you think of "Union queries" vs "Callback functions" ?
--
Gerry Hickman (London UK)
http://www.gerry1.dircon.co.uk/



Sun, 01 Dec 2002 03:00:00 GMT  
 ComboBox Custom Fill Functions
Gerry:
I was unaware that callbacks could be compared to union queries. The only
callbacks I am familiar with are those implemented through API calls.
--
Bruce M. Thompson


Quote:
> Hello Bruce,

> > The values of variables are stored locally in the machine that is
running
> > the code (each machine would have its own instance of code running in
its
> > own memory). This problem would only occur in the way you have already
> > experienced it.

> Ah! Of course.

> So it's not as bad as I thought :)

> What do you think of "Union queries" vs "Callback functions" ?
> --
> Gerry Hickman (London UK)
> http://www.gerry1.dircon.co.uk/



Sun, 01 Dec 2002 03:00:00 GMT  
 ComboBox Custom Fill Functions
It was not bad terminology.... it is a list filling callback function, or a
"fill function" for short.

--
MichKa
"Cause it's a bittersweet symphony, thats life..."  -- The Verve

random junk of dubious value, at the multilingual,
no scripts required, http://www.trigeminal.com/


Quote:
> > I was unaware that callbacks could be compared to union queries. The
only
> > callbacks I am familiar with are those implemented through API calls.

> Sorry, bad terminology.

> When I say "callback" I'm referring to the "ListBoxFill" function that
> you can call from a combo to do stuff like adding <All Records> to the
> list.

> The other way of doing it is to use a UNION query; you simply append
> "<All Records>" (or whatever term you like) to the beginning or end of
> the query, then you enter that query for the combo box data source.

> When the user clicks the drop down arrow, they'll see the extra row (or
> rows).
> --
> Gerry Hickman (London UK)
> http://www.gerry1.dircon.co.uk/



Mon, 02 Dec 2002 03:00:00 GMT  
 ComboBox Custom Fill Functions

Quote:
> I was unaware that callbacks could be compared to union queries. The only
> callbacks I am familiar with are those implemented through API calls.

Sorry, bad terminology.

When I say "callback" I'm referring to the "ListBoxFill" function that
you can call from a combo to do stuff like adding <All Records> to the
list.

The other way of doing it is to use a UNION query; you simply append
"<All Records>" (or whatever term you like) to the beginning or end of
the query, then you enter that query for the combo box data source.

When the user clicks the drop down arrow, they'll see the extra row (or
rows).
--
Gerry Hickman (London UK)
http://www.gerry1.dircon.co.uk/



Tue, 03 Dec 2002 03:00:00 GMT  
 ComboBox Custom Fill Functions
Hey, I just learned something today! Thanks.
--
Bruce M. Thompson



Quote:
> It was not bad terminology.... it is a list filling callback function, or
a
> "fill function" for short.

> --
> MichKa
> "Cause it's a bittersweet symphony, thats life..."  -- The Verve

> random junk of dubious value, at the multilingual,
> no scripts required, http://www.trigeminal.com/



> > > I was unaware that callbacks could be compared to union queries. The
> only
> > > callbacks I am familiar with are those implemented through API calls.

> > Sorry, bad terminology.

> > When I say "callback" I'm referring to the "ListBoxFill" function that
> > you can call from a combo to do stuff like adding <All Records> to the
> > list.

> > The other way of doing it is to use a UNION query; you simply append
> > "<All Records>" (or whatever term you like) to the beginning or end of
> > the query, then you enter that query for the combo box data source.

> > When the user clicks the drop down arrow, they'll see the extra row (or
> > rows).
> > --
> > Gerry Hickman (London UK)
> > http://www.gerry1.dircon.co.uk/



Tue, 03 Dec 2002 03:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. create custom icon,custom combobox in custom toolbar

2. create custom icon,custom combobox(to insert values)in custom toolbar

3. Filling a Secondary Combobox based on information from a primary combobox

4. Programatically fill a combobox A2K ??

5. Using the pipe symbol to fill a listbox or combobox

6. fill combobox with contents directory

7. Reference ComboBox item to fill ListBox

8. Fill a combobox

9. How to clear a filled combobox

10. Filling a comboBox with ODBC-data

11. Filling a ComboBox with data from DB

12. Fill List/Combobox

 

 
Powered by phpBB® Forum Software