Hi all
I got a menu form that contains a sub form which ultimately had another sub form within that sub form, which goes something like this
1. Menu form2. Supplier Form header (SFrm_ExpirySummary)
3. Supplier details data table (SFrm_SupplierExpiry)
Form 3 get's it data from a query which contains a where statement that get's it data from a text box in form 2 (that is filled by a dropdown control in the same form)
Form 2 is simply ran as a sub form in Form 1
The Query it's trying to run is
Code:
SELECT Tble_GrowerDetails.SupplierCode,
Tble_GrowerDetails.SupplierName,
Tble_GrowerDetails.City,
Tble_GrowerDetails.State,
Tble_GrowerDetails.PostCode,
Tble_QACerts.BaseScheme,
Tble_QACerts.SchemeExpiry,
Tble_TestResults.ProduceCat,
Tble_TestResults.TestType,
Tble_TestResults.TestExpiry
FROM ((Tble_GrowerDetails INNER JOIN Qry_Supp_ExpiryStatus ON Tble_GrowerDetails.SupplierCode = Qry_Supp_ExpiryStatus.SupplierCode) INNER JOIN Tble_QACerts ON Tble_GrowerDetails.SupplierCode = Tble_QACerts.SupplierCode) INNER JOIN Tble_TestResults ON Tble_GrowerDetails.SupplierCode = Tble_TestResults.SupplierCode
WHERE (((Qry_Supp_ExpiryStatus.Flag) Like [Forms]![Menu]![Frm_ExpirySummary]![txtCrit]))
GROUP BY Tble_GrowerDetails.SupplierCode, Tble_GrowerDetails.SupplierName, Tble_GrowerDetails.City, Tble_GrowerDetails.State, Tble_GrowerDetails.PostCode, Tble_QACerts.BaseScheme, Tble_QACerts.SchemeExpiry, Tble_TestResults.ProduceCat, Tble_TestResults.TestType, Tble_TestResults.TestExpiry;
Now I got a problem where if I try to close the menu form via a VBA or Macro it tries to evoke that query and asks for the parameter which ultimately crashes the database, this is despite that the button is simply close form and open an unrelated form
doesn't try to run it if I hit the X button though or if i simply minimize the Menu form
There is no macro/vba that I can identify that runs on load
Any idea?