I'm guessing that
If Me!Text1 = "" And Me!Text2 = "" Then
is meant to check for the lack of data in those Controls...but it's actually only checking for Zero-Length Strings! 'Empty' Controls, in Access, are usually Null. To check for both ZLSs and Nulls, you can use a number of hacks, including
If Nz(Me!Text1, "") = "" And Nz(Me!Text2, "") = "" Then
And as Ajax said, the exact syntax depends on the Datatypes of Fields in the Where Clause.
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007