Brain freeze

M

MikeB

I'm starting to live here... :)

OK, here is my problem.

I have a table of Players.

Each year some Players drop off, some new ones join and some have
changed player data.

What is a way to figure out (in a form?) whether a player has an
existing record before I add a new record?

Combo-box with all player names? Search button? If the Combo-box,
then I guess I have to write the "notInList" event procedure to ?
create a new record/set the form in Add mode?

Thanks
 
M

MikeB

I'm starting to live here... :)

OK, here is my problem.

I have a table of Players.

Each year some Players drop off, some new ones join and some have
changed player data.

What is a way to figure out (in a form?) whether a player has an
existing record before I add a new record?

Combo-box with all player names? Search button? If the Combo-box,
then I guess I have to write the "notInList" event procedure to ?
create a new record/set the form in Add mode?

Thanks

One more issue. If I do go the ComboBox route, then I need a drop-down
on the Last Name, and then, since there may be multiple players with
the same last name, I'd need to dynamically update the first name drop-
down to refresh with only first names from the selected last name?
How do I do that?

Ugh. This stuff is getting difficult. I'm starting to remember why I
stopped with a 60% solution last year.
 
D

Douglas J. Steele

MikeB said:
One more issue. If I do go the ComboBox route, then I need a drop-down
on the Last Name, and then, since there may be multiple players with
the same last name, I'd need to dynamically update the first name drop-
down to refresh with only first names from the selected last name?
How do I do that?

You only need a single combo box that has multiple columns.

While you can only bind one column of the combo box to one field in the
form's recordset, you can put code in the combo box's AfterUpdate event to
assign additional values to other controls. For example,

Private Sub cboPlayer_AfterUpdate()

Me.txtFirsName = Me.cboPlayer.Column(1)

End Sub

will put the content of the second column of the selected row in the combo
box into a control named txtFirstName. (The Column collection starts
numbering at 0)
 

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