Populating one combo box to automatically populate another combo box

C

CAM

Hello,

In my form I have two combo boxes. The first combo box called [cboclerks]
that has a list of clerks names which is pulled from a table called
[uwclerks], which only has one field called [clerks]. The user selects the
clerks name in the [clerks] combo box not a problem so far. I have another
combo box called [cbomanagers] which pull from a table called [managers].
Now here is my problem my users are asking me if there is a way to link the
clerks with the manager so they don't have to click on the [cbomanager]
combo box. For example if the clerks select Jane Doe in the [cboclerks]
combo box, the [cbomanagers] combo box manager John Doe gets automatically
selected . I was thinking of having both the clerk with their respective
manager in one table and some how link them together on both combo boxes,
but I not sure if I am going in the right direction. Any tips will be
appreciated. Thank you in advance.
 
S

Steve Schapel

CAM,

If I understand you correctly, at present there is no data in your
database which defines which Manager is applicable to each Clerk. Is
this correct? Probably it would be logical to have a Manager field in
the uwClerks table, so each Clerk has their Manager listed.

I am not sure what is the nature of the table that is behind the form
your comboboxes are on. But whatever it is, this table probably should
not have a Manager field. This is because it is redundant
information... when you know the Clerk, you automatically know the
Manager, so no need to store this separately again in the table.
Therefore the Manager control on the form should be unbound. And if
your users are no longer going to need to select/enter the Manager, it
probably should be a textbox, not a combobox.

There are a number of approaches that are commonly taken to display
related information like this. Some of these are discussed in this
article...
http://accesstips.datamanagementsolutions.biz/lookup.htm
I suggest you read through this article, with a view to how it relates
to your question, and then post back if you need more explicit help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top