public FunctionsInfo(string pstrSource, ref int plonProcessLocation) { mlonNumOpenFormNames = 0; mbolHasFormLoad = false; mbolHasFormOpen = false; mbolHasActive = false; mbolHasCurrent = false; mbolHasFormClose = false; while (!(plonProcessLocation >= pstrSource.Length)) { //get function info FunctionInfo sclsFunctionInfo = new FunctionInfo(); bool sbolFoundFunction = sclsFunctionInfo.PopulateFunctionInfoWithNextFunction(pstrSource, ref plonProcessLocation); if (sbolFoundFunction) { mlstFunctions.Add(sclsFunctionInfo, sclsFunctionInfo.Name.ToLower()); foreach (string sstrEachOpenFormName in sclsFunctionInfo.OpenFormNames) { mlstOpenFormNames.Add(sstrEachOpenFormName); mlonNumOpenFormNames = mlonNumOpenFormNames + 1; } //from http://bytes.com/topic/access/answers/196005-difference-between-form_open-form_load about VBA //When you first open a form, the following events occur in this order:Open Þ Load Þ Resize Þ Activate Þ Current //If you Then 're trying to decide whether to use the Open or Load event for your macro or event procedure, one significant difference is that the Open event can be canceled, but the Load event can't. For example, if you're dynamically building a record source for a form in an event procedure for the Form 's Open event, you can cancel opening the form if there are no records to display. //When you close a form, the following events occur in this order:Unload Þ Deactivate Þ Close if (sclsFunctionInfo.Name.ToLower() == "form_open") { mbolHasFormOpen = true; } else if (sclsFunctionInfo.Name.ToLower() == "form_load") { mbolHasFormLoad = true; } else if (sclsFunctionInfo.Name.ToLower() == "form_resize") { MessageBox.Show("config form_resize - update PageInfo.vb:WritePHPPage as well"); } else if (sclsFunctionInfo.Name.ToLower() == "form_activate") { mbolHasActive = true; } else if (sclsFunctionInfo.Name.ToLower() == "form_current") { mbolHasCurrent = true; } else if (sclsFunctionInfo.Name.ToLower() == "form_unLoad") { mbolHasFormUnload = true; } else if (sclsFunctionInfo.Name.ToLower() == "form_deactivate") { MessageBox.Show("config form_deactivate - update PageInfo.vb:WritePHPPage as well"); } else if (sclsFunctionInfo.Name.ToLower() == "form_close") { mbolHasFormClose = true; } } else { break; // TODO: might not be correct. Was : Exit Do } } return; }