Sub Form Datasheet Dbl-Click Events

MCOwen

Programmer
Local time
Yesterday, 21:04
Joined
Aug 11, 2007
Messages
5
I have a main form which allows the user to "filter" the data in a subform in datasheet view (it actually creates a custom sql and updates the subform's Recordsource property). I have set up two events in the datasheet sub form: a Form Dbl-Click and a Dbl-Click on one of the columns/controls (simple msgbox displays). In testing, I've opened the subform directly and each event fires correctly ... the Msgbox displays. When I open the main form and test the subform Dbl-Click events using the default subform recordsource, the Dbl-Click events still fire. However, once I modifiy the subform Recordsource through a droplist After_Update event, the Dbl-Click events now will not fire. The modified subform recordsource is displaying the correct records. Only the subform recordsource is being modified in the droplist After_Update.

Something is clearly chaning in the subform properties, but I can not see what.

Appreciate any thoughts and insights,
Marty
 
first, you are definitely changing the recordsource, rather than the sourceobject arent you?

not sure - maybe if the new recordsource is non-updateable, then some events might not be possible.
 
Yes, I'm changing the Recordsource and not the Sourceobject property.

In desperation I rebuilt both forms from scratch and it now works. Not sure what to make of that other than there must have been a "problem" with one or both of the original forms.
 
If events do not fire when they should fire that is a very strong indicator of a possible corrupt form/report.
 

Users who are viewing this thread

Back
Top Bottom