subform is processing before parent form finishes loading (ADP)
Posted on 2004-09-13
This particular quirk hasn't happened to me before. I have a form that has a subform. The subform's record source is a stored procedure and there are two input parameters. There are no child/master links between the two forms, but the parameters for the subform are pulled from the main form. The Input parameters line looks like this:
@Date smalldatetime = [Forms]![frmOrders]![tbxDate], @Crop nvarchar(25) = [Forms]![frmOrders]![tbxCurrentCropID]
The problem is that when I open the parent form, popups that ask for parameter inputs are appearing. I was thinking that this was happening because the subform was trying to process the stored procedure before the form loaded. So I make sure in my form's Load event that the two fields that control the parameters are set to something (the current date and the first crop of a drop down list). Then I put in a couple test msgbox popups to show me these values.
Well, the parameters popups are still popping up BEFORE my msgbox popups (which have the correct values), indicating to me that the subform is trying to process the data even before the Form_Load event? I don't understand. I have other forms/subforms with this setup, and those are working fine so there must be some detail I am overlooking...
Thanks for any help.