I am trying to do some work with listboxes but am having some trouble. I don't know the best way to ask for help on this, so I will be as specific as possible
I have 2 tables in my database
tblAthletes (with primary key AthleteID, also fields lastname and firstname)
tblRoster (with primary key RosterID being an autonumber, and AthleteID which is the foreign key that matches up with AthleteID from tblAthlete)
My problem is the roster form. I have a list box, list0, which has AthleteID, lastName, and FirstName from tblAthlete.
When I click a command button on my form, I want the AthleteID that is selected in List0 to be "copied" over to the AthleteID field in tblRoster.
Example: If I have the athlete highlighted in List0 whose AthleteID is 147, I want that 147, which is from tblAthlete, to be placed into a new record in the AthleteID spot on tblRoster.
How would I go about doing this? Any help you can give would be greatly appreciated. Thanks.
-Chris
I have 2 tables in my database
tblAthletes (with primary key AthleteID, also fields lastname and firstname)
tblRoster (with primary key RosterID being an autonumber, and AthleteID which is the foreign key that matches up with AthleteID from tblAthlete)
My problem is the roster form. I have a list box, list0, which has AthleteID, lastName, and FirstName from tblAthlete.
When I click a command button on my form, I want the AthleteID that is selected in List0 to be "copied" over to the AthleteID field in tblRoster.
Example: If I have the athlete highlighted in List0 whose AthleteID is 147, I want that 147, which is from tblAthlete, to be placed into a new record in the AthleteID spot on tblRoster.
How would I go about doing this? Any help you can give would be greatly appreciated. Thanks.
-Chris