Using A2007. This question hopefully a little simpler than the other recent post with similar title.
I am opening a form and filtering it as follows:
DoCmd.OpenForm "F_ErrorsMisc_Popup", , , "(ScoringBasis=""tot"" and (isnull(A) or isnull(B))) OR (ScoringBasis=""tod"" and (isnull(Distance) or Distance=0))"
It works, but I hate having long expressions like this-(I’m a little dyslexic and I will be adding conditions) I would like to simplify by making Dim statements for the expressions on each side of OR so that I can have smaller expressions to modify if needed. Then, open the form with:
Docmd.openform,”F_ErrorsMisc_Popup”, , , sWhere1 OR sWhere2
I try it and just can’t seem to find the right sequence of quotation marks or whatever else is needed.. Always get errors like type mismatch etc.
Any help much appreciated