If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Blank field in form
I have a query that gets some criteria (City and State) from a form.
I have the State field set up as a ComboBox connected to a local table I created. If a user was to type in a City (i.e. "Springfield") and then leave the State field empty, then the query would have no results. How do I make the query so that if one of the fields on the form is left empty it will run for all possibilities (i.e. look for all Springfields in any state)? |
#2
|
|||
|
|||
Blank field in form
It would help tremendously if you had provided the SQL view of your query.
Without that I can suggest you might use a where clause like: WHERE [State] = Forms!AForm!cboState or Forms!AForm!cboState Is Null; -- Duane Hookom Microsoft Access MVP "Bvdman32" wrote: I have a query that gets some criteria (City and State) from a form. I have the State field set up as a ComboBox connected to a local table I created. If a user was to type in a City (i.e. "Springfield") and then leave the State field empty, then the query would have no results. How do I make the query so that if one of the fields on the form is left empty it will run for all possibilities (i.e. look for all Springfields in any state)? . |
Thread Tools | |
Display Modes | |
|
|