Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dependent Box Question Help

Status
Not open for further replies.

Igawa29

MIS
Jan 28, 2010
99
0
0
US
I have a problem that I am hoping someone could help me with. I am trying to take a table and display it in a form but with the following criteria.

Table: Baseball
Fields: Team, Player, Position, Error Rate

1)So in my form I am going to have a drop down box for (Team), when I select my (Team) I want this to automatically populate a list box with the (Player List) from that (Team).

2)Then I want to select a (Player) from that list box and have that populate the (Player's Position) in another list box next to it.

3) Then finally I want to click on the (Position) and have that auto populate another list box with the (Error Rate).


So I want it to look like this:

Yankees -> Ruth -> P
Mantle RF -> .241
Igawa


Any ideas or help would be so great on this. I am very curious about how to get things set up. I have my table and I have my form built. Im guessing it will require some SQL with the form but I'm not sure.
 
How are ya Igawa29 . . .


Have a look here ... faq702-4289

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
That is somewhat helpful, I am trying to wrap my mind around it. Would you be so kind as to use my example and put what I have in that format.. maybe I am just not seeing it properly and will if I see it using the example I gave. Thank you so much.
 
Igawa29 . . .

What have you tried? [surprise]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Thank you TheAceMan for the tips on this.

This is the part of the code that I am not understanding:
[Forms]![Form2]![cboManufacturer]

I first linked my excel to access, and the primary key of my table has a 1 to many relationship on most fields. So first I tried to group the "Team" to the "Players". Then I tried to put the code in that was suggested, which is dependent upon my selection. I keep getting an error on my selection, and I don't think I am setting up my query correctly.

Are there other examples of this type of logic that you know of? I think if I see it used in multiple sources I can understand it.. for some reason my mind isn't wrapping around this one.
 
Igawa29 . . .

Because your linked Excel table is not [blue]normalized[/blue] (see Database Normalization Basics about this), it makes setup a little harder. Despite this I'll see what I can do to get you thru ... you just need to keep in mind that [blue]you have too learn to think database ... not spreadsheet![/blue]

To make it easier to help you ... post the [blue]Row Source[/blue] you used for the [blue]Team[/blue] & [blue]Player[/blue] comboboxes. I need to know the actual names of table and controls.

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Alright :) I figured out my problem here is what I did.

Whenever I chose the team I did a me.refresh on the player table. This allowed me to pick boxes that just relate to the team. I used the [FORMS]![FORM1]![list12] code to have the box locate the previous box value.

I really appreciate your help TheAceMan1.. I just kept reading that post you linked over and over. Finally when it clicked in my mind it worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top