Keeping info in combobox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am re-doing a reservation system for a charity where peole can sponsor tables but thew location needs to know the names of all individuals attending. The current system has the user enter each reservation seperately for the table members. I need to be able to specify the host and a room for the table, then assign the names to the group. I am using a subform with a Combo Box in the header to select the room for the 1 to many individuals with the group. The Combo Box will put the correct value in the Room Code for the first record, when I move to the next record, the Combo Box is blank and the Room Code is not set. How do I keep the initial value that I set in the combobox for the second and subsequent entries

I have tried the following code in the AfterUpdate event of the combo box

Private Sub Combo17_AfterUpdate(
Me.Combo17.DefaultValue = Me.Combo17.Valu
End Su

It doesn't work for me. I need some help please. Thank you in advance
 
Regardless of the datatype, the DefaultValue property must be in quotes:

Me.Combo17.DefaultValue = """" & Me.Combo17.Value & """"

or

Me.Combo17.DefaultValue = Chr$(34) & Me.Combo17.Value & Chr$(34)



--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


GregK said:
I am re-doing a reservation system for a charity where peole can sponsor
tables but thew location needs to know the names of all individuals
attending. The current system has the user enter each reservation
seperately for the table members. I need to be able to specify the host and
a room for the table, then assign the names to the group. I am using a
subform with a Combo Box in the header to select the room for the 1 to many
individuals with the group. The Combo Box will put the correct value in the
Room Code for the first record, when I move to the next record, the Combo
Box is blank and the Room Code is not set. How do I keep the initial value
that I set in the combobox for the second and subsequent entries?
 
Thank you for the input. I have had to go a different route to handle some additional functionality. I appreciate the quick feedback.
 
Back
Top