snorkyller
02-18-2011, 08:56 AM
I have a bug that I can't resolve.
It happens when I Requery a subform for the first time after I opened the form, and only if there are no records.
The bug is that the Form_Current event is not called (I'm talking about the Form_Current event of the Form displayed in the subform).
More precisely:
When I choose a Client, the Contracts related to this Client are displayed into a subform. If the Client doesn't have any Contract yet, than the Form_Current event will not be called. But if I select a 2nd time this Client, the subform will be Requery for a 2nd time, and then the Form_Current event will be called (???).
When I choose a Client that has many Contracts, everything's right.
Here's how I requery the subform:
[Forms]![frmGestionClients]![sfrSuivis].Requery
I hope that you have a clue... This is very strange.
It happens when I Requery a subform for the first time after I opened the form, and only if there are no records.
The bug is that the Form_Current event is not called (I'm talking about the Form_Current event of the Form displayed in the subform).
More precisely:
When I choose a Client, the Contracts related to this Client are displayed into a subform. If the Client doesn't have any Contract yet, than the Form_Current event will not be called. But if I select a 2nd time this Client, the subform will be Requery for a 2nd time, and then the Form_Current event will be called (???).
When I choose a Client that has many Contracts, everything's right.
Here's how I requery the subform:
[Forms]![frmGestionClients]![sfrSuivis].Requery
I hope that you have a clue... This is very strange.