Combo Lists

  • Thread starter Thread starter TracyM via AccessMonster.com
  • Start date Start date
T

TracyM via AccessMonster.com

I have a database which captures colleagues requesting projects from our
department. Everything work fine, and now I am just tweeking it before it
goes live.

What I want to know is whether I can create a combo list that is generated as
records are created?

For instance there is a field for the colleagues name, but it would take me
forever to put everyone's name in, so what I wanted to do was if they request
more projects instead of having to enter their names over and over again, can
i just pick it from a previoue entry?

Hope that makes sense
Thanks
Tracy
 
Hi Tracy,

You haven't posted any detail of your combo-box's recordsource, but in
general this is pretty simple.

Set the recordsource of your combo-Box to a query with a DISTINCT clause in
it, based on the table which contains the existing information. Something
like:

SELECT DISTINCT ColleagueName FROM MyTableName;

HTH,

Rob
 
Hi Rob

the control source points to a text field in the main table called, 'colleage
name', if I do this query can I still add new names or will it be limited to
existing information?

Thanks in advance
Tracy

Rob said:
Hi Tracy,

You haven't posted any detail of your combo-box's recordsource, but in
general this is pretty simple.

Set the recordsource of your combo-Box to a query with a DISTINCT clause in
it, based on the table which contains the existing information. Something
like:

SELECT DISTINCT ColleagueName FROM MyTableName;

HTH,

Rob
I have a database which captures colleagues requesting projects from our
department. Everything work fine, and now I am just tweeking it before it
[quoted text clipped - 15 lines]
Thanks
Tracy
 
Hi Tracy,

If you set the Limit To List property of the combobox to No, you will be
able to enter any new name into it - but you won't get the "autofind"
behaviour, where it will select the next matching entry as you type into it.
If you want that as well as the ability to enter a new entry, you can set
Limit To List to Yes and use a bit of VBA code to add the new entry (this
approach works better if the entries are stored in a separate table, rather
than in the main table - if you want more detail, just ask).

HTH,

Rob


TracyM via AccessMonster.com said:
Hi Rob

the control source points to a text field in the main table called,
'colleage
name', if I do this query can I still add new names or will it be limited
to
existing information?

Thanks in advance
Tracy

Rob said:
Hi Tracy,

You haven't posted any detail of your combo-box's recordsource, but in
general this is pretty simple.

Set the recordsource of your combo-Box to a query with a DISTINCT clause
in
it, based on the table which contains the existing information. Something
like:

SELECT DISTINCT ColleagueName FROM MyTableName;

HTH,

Rob
I have a database which captures colleagues requesting projects from our
department. Everything work fine, and now I am just tweeking it before
it
[quoted text clipped - 15 lines]
Thanks
Tracy
 
Hi Rob

Thanks for your help, much appreciated.

I think I have sorted it now, what I did was create a totals query based on
the field in the table, and then pointed my combo box to the query. This
seems to work well, it lists any previously added names and lets me add new
ones as well.

Thanks again
Tracy

Rob said:
Hi Tracy,

If you set the Limit To List property of the combobox to No, you will be
able to enter any new name into it - but you won't get the "autofind"
behaviour, where it will select the next matching entry as you type into it.
If you want that as well as the ability to enter a new entry, you can set
Limit To List to Yes and use a bit of VBA code to add the new entry (this
approach works better if the entries are stored in a separate table, rather
than in the main table - if you want more detail, just ask).

HTH,

Rob
[quoted text clipped - 29 lines]
 
Back
Top