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
|
|||
|
|||
Combo box Subform Control Default
Apologies if this is here already - I can't seem to find it and I'm seriously
stumped about how I do it. I'm working on a main form which has a combo box and a subform control. Depending on the option picked in the combo box, a different subform appears in the subform control. When you open the form however, there are just empty boxes. Is there a way to set a default subform to appear? I'm a bit of an access newbie so all help would be very much appreciated! |
#2
|
|||
|
|||
Combo box Subform Control Default
Hi Hannah,
here is a way to set the combo box to show the first record on the list. Me.[NameOfCombo] = Me.[NameOfCombo].ItemData(0) To make the subform control show the subform for the first item in the combo, use something like this-- Call [NameOfCombo]_AfterUpdate The above 2 lines of code can go on the Load event of the main form. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "Hannah" wrote in message ... Apologies if this is here already - I can't seem to find it and I'm seriously stumped about how I do it. I'm working on a main form which has a combo box and a subform control. Depending on the option picked in the combo box, a different subform appears in the subform control. When you open the form however, there are just empty boxes. Is there a way to set a default subform to appear? I'm a bit of an access newbie so all help would be very much appreciated! |
#3
|
|||
|
|||
Combo box Subform Control Default
Thanks Jeanette. I've got it working now and it looks so much better. Thanks
ever so much again! Hannah "Jeanette Cunningham" wrote: Hi Hannah, here is a way to set the combo box to show the first record on the list. Me.[NameOfCombo] = Me.[NameOfCombo].ItemData(0) To make the subform control show the subform for the first item in the combo, use something like this-- Call [NameOfCombo]_AfterUpdate The above 2 lines of code can go on the Load event of the main form. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "Hannah" wrote in message ... Apologies if this is here already - I can't seem to find it and I'm seriously stumped about how I do it. I'm working on a main form which has a combo box and a subform control. Depending on the option picked in the combo box, a different subform appears in the subform control. When you open the form however, there are just empty boxes. Is there a way to set a default subform to appear? I'm a bit of an access newbie so all help would be very much appreciated! . |
Thread Tools | |
Display Modes | |
|
|