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
|
|||
|
|||
If subform dirty, field in main form visible
On my main form (frmBenefits), I have a subform (subActions) that is
continuous. Either when the the subform receives focus or if the subform is dirty (I don't care which), I would like a field on the main form (cboStatus) to become visible. I've googled and googled and can't find when/where to trigger the event and the proper syntax. Any help and direction is greatly appreciated! |
#2
|
|||
|
|||
If subform dirty, field in main form visible
"MiataDiablo" wrote in message
... On my main form (frmBenefits), I have a subform (subActions) that is continuous. Either when the the subform receives focus or if the subform is dirty (I don't care which), I would like a field on the main form (cboStatus) to become visible. I've googled and googled and can't find when/where to trigger the event and the proper syntax. Any help and direction is greatly appreciated! For showing the combo box when the subform gets the focus, you could use the subform *control's* Enter event. I'm talking here about the subform control on the main form, not any of the controls that are actually on the subform. Anyway, your code would be something like this: '------ start of code ------ Private Sub subActions_Enter() Me.cboStatus.Visible = True End Sub Private Sub subActions_Exit() Me.cboStatus.Visible = False End Sub '------ end of code ------ The code for the Exit event is because I assume that you want to hide the combo when the subform doesn't have the focus. If you want to wait until the subform becomes dirty, you could use the Dirty event of the subform's SourceObject form, but you'd also have to use some event of the main form, maybe the Current event, to hide the combo box again. -- Dirk Goldgar, MS Access MVP Access tips: www.datagnostics.com/tips.html (please reply to the newsgroup) |
#3
|
|||
|
|||
If subform dirty, field in main form visible
On Nov 9, 10:29*am, "Dirk Goldgar"
wrote: "MiataDiablo" wrote in message ... On my main form (frmBenefits), I have a subform (subActions) that is continuous. *Either when the the subform receives focus or if the subform is dirty (I don't care which), I would like a field on the main form (cboStatus) to become visible. I've googled and googled and can't find when/where to trigger the event and the proper syntax. *Any help and direction is greatly appreciated! For showing the combo box when the subform gets the focus, you could use the subform *control's* Enter event. *I'm talking here about the subform control on the main form, not any of the controls that are actually on the subform. Anyway, your code would be something like this: '------ start of code ------ Private Sub subActions_Enter() * * Me.cboStatus.Visible = True End Sub Private Sub subActions_Exit() * * Me.cboStatus.Visible = False End Sub '------ end of code ------ The code for the Exit event is because I assume that you want to hide the combo when the subform doesn't have the focus. If you want to wait until the subform becomes dirty, you could use the Dirty event of the subform's SourceObject form, but you'd also have to use some event of the main form, maybe the Current event, to hide the combo box again. -- Dirk Goldgar, MS Access MVP Access tips:www.datagnostics.com/tips.html (please reply to the newsgroup) Thank you so much, as usual I was killing a gnat with C4. |
Thread Tools | |
Display Modes | |
|
|