Re: Combo Box
- From: LF <LF@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 10 Jan 2007 20:53:00 -0800
I'm no Access MVP but I think you only need one combo box to accomplish what
you are describing. Simply make the other three controls text boxes; and bind
all four controls to the appropiate table fields. Then use the AfterUpdate
event of the single combobox to feed it's selected value to the
DoCmd.GoToRecord command.
If I'm not understanding your description accurately and you really need
four synchronized comboboxes, I think you could just bind the first combobox
to the approprate table field then use If/Then code within its AfterUpdate
event to loop through each of the three unbound combobox contols and set it's
value accordingly. For Example:
IF cbo1.Value = 1 THEN cbo2.Value = 2 AND cbo3.Value = 3 AND cbo4.Value = 4.
IF cbo1.Value = 2 THEN cbo2.Value = 22 AND cbo3.Value = 23 AND cbo4.Value
= 24
etc.
If you want all four comboboxes to update no matter which combobox is
updated; repeat the code in each combobox revising the control names and
equals values appropriately.
Or you may need to layer bound text fields ontop of unbound comboboxes that
lookup all distinct field values and use the AfterUpdate events of the
layered controls to hide the other when appropriate. I know you can find
detailed explanations of how to do this on the Microsoft Knowledge Base
website.
Hope one these methods leads you in the right direction.
"Jeff Boyce" wrote:
Have you taken a look at the reference I offerred (cascading combo boxes)?.
Regards
Jeff Boyce
Microsoft Office/Access MVP
"Fred" <Fred@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:ECDF8AC4-9123-4123-AEF7-716DECE4421C@xxxxxxxxxxxxxxxx
Well I actually am trying to do this through a form. I made a combo box
from
a table (Reason Codes) And for each reason code I want it to automatically
update the other combo boxes from the same table (Reason codes) It will
allow
me to use two combo boxes that will automatically update when I select a
reason code, but any more than 2 and it doesn't work.
"Jeff Boyce" wrote:
Fred
I'm still a bit short on context. Are you trying to do this within a
table?
Tables are great for storing data, but lousy for managing the display of
data.
Are you trying to do this in a form? If so, it sounds like you are
saying
that you want to have the values in the second combobox depend on the
choice
in the first, and the third on the second, and so on. If this is a fair
description, and if you'll do this in a form, then you need to look up
"cascading comboboxes" in HELP, at mvps.org/access, or via some search
tool
(e.g., Google.com).
If you aren't doing this in a form, search this group (tablesdbdesign)
for
the many reasons NOT to use "lookup" data types in table definitions.
Good luck!
Regards
Jeff Boyce
Microsoft Office/Access MVP
"Fred" <Fred@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:543184E9-E09A-4D27-9A04-7AC5853294D0@xxxxxxxxxxxxxxxx
Sorry about that. I made a table which has reason codes, Reason
Description,
Days added on and Points which have 54 total records.. Now I am trying
to
make combo boxes that display all 4 types (Reason code, Reason
Description,
Days added on and Points) in combo boxes. For example if Reason code 10
is
needed, reason description should be "Absence Doc Rec'd, Days added on
s/b
1
and points s/b 0. Though when I try to make 4 combo boxes for each
field,
it
doesn't work.
"Jeff Boyce" wrote:
Fred
We're not there. We can't see your database. We don't know how
you've
designed your table.
Since you've posted in the tablesdbdesign newsgroup, should we assume
you
are trying to do this directly in a table, rather than where it would
properly belong, in a form?
"All information" is a VERY broad statement ... can you narrow it down
a
bit, or describe a bit more what you mean by this?
Regards
Jeff Boyce
Microsoft Office/Access MVP
"Fred" <Fred@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1D7E7C6B-EB7F-48B4-BFAE-C0D3B19A20FA@xxxxxxxxxxxxxxxx
How can I use 4 combo boxes to each show all information from a
table?
I
am
only able to get 2 combo boxes to show 2 table fields.
- Follow-Ups:
- Re: Combo Box
- From: Jeff Boyce
- Re: Combo Box
- References:
- Re: Combo Box
- From: Jeff Boyce
- Re: Combo Box
- From: Jeff Boyce
- Re: Combo Box
- From: Fred
- Re: Combo Box
- From: Jeff Boyce
- Re: Combo Box
- Prev by Date: Re: Don't know how to explain my problem!!!
- Next by Date: Re: Don't know how to explain my problem!!!
- Previous by thread: Re: Combo Box
- Next by thread: Re: Combo Box
- Index(es):
Relevant Pages
|
Loading