"Bill" <Bill.RemoveThis@discussions.microsoft.com> wrote in message
news:80C76CF4-7523-479A-A95A-88519F4B2F78@microsoft.com...
> Hi,
> I have a Query By Form with several User Input Boxes. One is for a number,
> that I enter into the box. What I would like to do is, when I leave the
> input
> box blank for that column, I want to skip that input box and go to the
> next
> one. What can I to do?
> I am using the following Critera: [Forms]![frmQBF]![txtFirstNumber]
> I have tried using Blank=All, but it just give an error. Any help to point
> me in the right direction will be greatly appreciated.
If I understand you, you want to be able to leave one of your text boxes
blank and have it ignored in the query criteria. In principle, you do this
by having your query criteria accept the alternative that the form control
is Null. Like this SQL:
SELECT <desired fields> FROM YourTable
WHERE
((SomeField = Forms!frmQBF!txtFirstNumber)
OR (Forms!frmQBF!txtFirstNumber Is Null))
--
Dirk Goldgar, MS Access MVP
Access tips:
www.datagnostics.com/tips.html
(please reply to the newsgroup)