[AccessD] Raising events from a subform and sinking them in the parent form

Salakhetdinov Shamil mcp2004 at mail.ru
Tue Mar 25 04:05:33 CDT 2014


 Hi Gustav --

Yes, I see :)

-- Shamil

Tue, 25 Mar 2014 08:42:09 +0000 from Gustav Brock <gustav at cactus.dk>:
>Hi Shamil
>
>He he, no you didn't, but that was what Charlotte was expecting, so she didn't even have to read your comment to know that you would suggest to use WithEvents.
>
>I did read it but had to read twice, because I thought I missed the word WithEvents in the first run!
>
>So I guess you will have to realize that still after all these years WithEvents is sticking to you.
>
>/gustav
>
>
>-----Oprindelig meddelelse-----
>Fra:  accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] På vegne af Salakhetdinov Shamil
>Sendt: 24. marts 2014 23:39
>Til: Access Developers discussion and problem solving
>Emne: Re: [AccessD] Raising events from a subform and sinking them in the parent form
>
> Charlotte --
>
>But I haven't proposed to use WithEvents, have I? :)
>
><<< and allowed the subform to search in it's (snapshot) recordset for the desired record>>> Well, subform loads before parent form but how does your subform get search/filtering criteria to search its (snapshot) recordset by?
>
>-- Shamil
>
>Mon, 24 Mar 2014 15:27:29 -0700 from Charlotte Foust < charlotte.foust at gmail.com >:
>>Because I was determined to make it work the other way, of course!  LOL
>>
>>Actually, I eventually worked out that way of doing it so that the 
>>people who will be maintaining it are more likely to understand than WithEvents.
>> I added a loaddata routine to the parent form, removed any 
>>master/child links on the subform, and allowed the subform to search in 
>>it's (snapshot) recordset for the desired record and pass the key into 
>>the loadData routine on the parent form.  It isn't elegant but these 
>>guys are engineers, not database developers, and they'll be able to understand this.
>>
>>Charlotte.
>>
>>
>>On Mon, Mar 24, 2014 at 1:48 PM, Salakhetdinov Shamil <  mcp2004 at mail.ru >wrote:
>>
>>>  Hi Charlotte --
>>>
>>> Why not just define a
>>>
>>> Public Sub ProcessEvent(ByVal eventName As String, ParamArray eventArgs())
>>>     MsgBox eventName & ", Params Count = " & UBound(eventArgs) + 1   ' test
>>> End Sub
>>>
>>> in the Parent form and call it from a  subform like that
>>>
>>> Me.Parent.ProcessEvent "Test event", "Prm1", 123.45  ' test call
>>> -- Shamil
>>>
>>>
>>> Mon, 24 Mar 2014 13:23:54 -0700 from Charlotte Foust < 
>>>  charlotte.foust at gmail.com >:
>>> >I know I've done this before but it probably required a class, which 
>>> >I hesitate to use in this app.  Has anyone else had problems raising 
>>> >and sinking events between forms in Access 2010/2013?
>>> >
>>> >Charlotte 
>
>



More information about the AccessD mailing list