RE: Calling Click Event from another Event
- From: GB <GB@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 2 Sep 2009 05:07:01 -0700
Okay, I used the same type of code within the same form (not referencing VBA
code in a different form) and I was able to call the applicable
"commandXXX_click" sub routine. So, I am guessing that I am referencing the
child form incorrectly from within the previous code. I am trying to
activate the click event of a command button on a child form. Any ideas?
"GB" wrote:
I have a form that has a child form. From the child form, I populate a list.
of information in the parent form by clicking on a command button. I also
have a command button on the child form that will remove the first (top) item
in the list when clicked.
What I am trying to do is write something that when an item is double
clicked in the list, say the 3rd item, that the commands of the remove button
are executed.
Currently I have tried the following:
Private Sub OpList_DblClick(Cancel As Integer)
Dim I As Long
Dim DeleteTo As Long
DeleteTo = OpList.ListIndex
For I = 0 To DeleteTo
[NextOperation_subform]!btnRmvOp.Click
Next I
End Sub
I have made the btnRmvOp_Click procedure public. I also have tried
modifying the !btnRmvOp.Click portion to state btnRmvOp_Click.
I haven't tried it yet, but I also wanted to make it possible to double
click on a list on the child form and call the click event for a button
located on that child form. I'm wondering if in the above code I'm
referencing the child form incorrectly from the parent form.
Please help.
- References:
- Prev by Date: Calling Click Event from another Event
- Next by Date: RE: Calling Click Event from another Event
- Previous by thread: Calling Click Event from another Event
- Next by thread: RE: Calling Click Event from another Event
- Index(es):
Relevant Pages
|