CocodaMonkey
New member
- Local time
- Today, 02:15
- Joined
- Oct 3, 2008
- Messages
- 4
I'm trying to run a function from a subform from an onclick event in the parent form.
The sub form is called ClientAddfrm and the function is
So all I want to do is wipe the sub form clean. Which the function does just fine if it's on an event in the sub form but if I go to the main form and call it by using "Call Me.ClientAddfrm.Form.clearaddclientbut_Click" it doesn't work. Although it does call the function because if I add something like "msgbox test" to the end of my function it displays the message.
I'm assuming it doesn't wipe my sub form because the focus is on the wrong form but I've tried everything i can think of to set the focus to the sub form before calling the function and I just can't get it to work.
All I need to do is wipe the bound subform clean of all information when it losses focus and I just can't figure out a way to do it.
The sub form is called ClientAddfrm and the function is
Code:
Public Sub clearaddclientbut_Click()
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
End Sub
So all I want to do is wipe the sub form clean. Which the function does just fine if it's on an event in the sub form but if I go to the main form and call it by using "Call Me.ClientAddfrm.Form.clearaddclientbut_Click" it doesn't work. Although it does call the function because if I add something like "msgbox test" to the end of my function it displays the message.
I'm assuming it doesn't wipe my sub form because the focus is on the wrong form but I've tried everything i can think of to set the focus to the sub form before calling the function and I just can't get it to work.
All I need to do is wipe the bound subform clean of all information when it losses focus and I just can't figure out a way to do it.