Without looking at what you have done it is hard to say.
I suspect that you have probably got a parameter on your query, that you have not entered the null part of the expression for, or have forgotton to include on your form for parameter selection.
The clue will be what the parameter is...