If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Keeping info in combobox
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.Value End Sub It doesn't work for me. I need some help please. Thank you in advance. |
#2
|
|||
|
|||
Keeping info in combobox
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 http://I.Am/DougSteele (no e-mails, please!) "GregK" wrote in message ... 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.Value End Sub It doesn't work for me. I need some help please. Thank you in advance. |
#3
|
|||
|
|||
Keeping info in combobox
Thank you for the input. I have had to go a different route to handle some additional functionality. I appreciate the quick feedback.
|
Thread Tools | |
Display Modes | |
|
|