Need to add other to list in combo box

  • Thread starter SElgin via AccessMonster.com
  • Start date
S

SElgin via AccessMonster.com

I have a bound combo box on my form that shows a list of songs. This combo
is fed by two other combo boxes, cboInstrument and cboLevel. Everything
works fine at this point. The problem is the client wants to add other to
the song list and if other is picked then show a text box for a title to be
input. I could add other to the song table under each level, but I am hoping
someone will have a cleaner and easier solution.

TIA for the help.

Steve
 
T

Tom van Stiphout

On Thu, 11 Jun 2009 00:28:31 GMT, "SElgin via AccessMonster.com"

I am not sure I understand you correctly, but if you want the user to
be able to add songs to the dropdown, you can program the NotInList
event. See help file for details.

-Tom.
Microsoft Access MVP
 
S

SElgin via AccessMonster.com

Tom

Thanks for the response.

I do not want to add songs to the list. I would like "Other" to appear as a
selection in the dropdown. If other is chosen, then a text box will be
visible to add the song only for that student.

Steve

I am not sure I understand you correctly, but if you want the user to
be able to add songs to the dropdown, you can program the NotInList
event. See help file for details.

-Tom.
Microsoft Access MVP
I have a bound combo box on my form that shows a list of songs. This combo
is fed by two other combo boxes, cboInstrument and cboLevel. Everything
[quoted text clipped - 6 lines]
 
T

Tom van Stiphout

On Thu, 11 Jun 2009 02:04:42 GMT, "SElgin via AccessMonster.com"

to make "Other" appear, use a union query. Something like:
select SongID, SongName from tblSongs
union
select OtherID, OtherName from tblOther

Fill tblOther with a single record: -1, "Other"

Then in the dropdown's AfterUpdate event you can write:
if myDropdown.Value = -1 then
Me.myTextbox.Visible = True
end if

-Tom.
Microsoft Access MVP

Tom

Thanks for the response.

I do not want to add songs to the list. I would like "Other" to appear as a
selection in the dropdown. If other is chosen, then a text box will be
visible to add the song only for that student.

Steve

I am not sure I understand you correctly, but if you want the user to
be able to add songs to the dropdown, you can program the NotInList
event. See help file for details.

-Tom.
Microsoft Access MVP
I have a bound combo box on my form that shows a list of songs. This combo
is fed by two other combo boxes, cboInstrument and cboLevel. Everything
[quoted text clipped - 6 lines]
 
S

SElgin via AccessMonster.com

Thanks Tom. Works great!

Steve
to make "Other" appear, use a union query. Something like:
select SongID, SongName from tblSongs
union
select OtherID, OtherName from tblOther

Fill tblOther with a single record: -1, "Other"

Then in the dropdown's AfterUpdate event you can write:
if myDropdown.Value = -1 then
Me.myTextbox.Visible = True
end if

-Tom.
Microsoft Access MVP
[quoted text clipped - 18 lines]
 

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