Solved "None" in query (1 Viewer)

TML15

Member
Local time
Today, 16:31
Joined
Apr 15, 2021
Messages
41
Sorry, newbie question:
I have a query that is attached to a drop down list in a form that includes the word "None".
Can I exclude "None" from the drop down menu? My ideas on how to solve this confuse "None" with Null or "0".

1620241693799.png


Thanks!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:31
Joined
Oct 29, 2018
Messages
21,358
Hi. What is the Row Source for your dropdown? Can you add <>"None" to its criteria?
 

TML15

Member
Local time
Today, 16:31
Joined
Apr 15, 2021
Messages
41
The Row Source is the query which has a criteria of Not is Null already
 

TML15

Member
Local time
Today, 16:31
Joined
Apr 15, 2021
Messages
41
Unfortunately, it didn't work. Is this how you suggested I try it?

1620242848124.png
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:31
Joined
Oct 29, 2018
Messages
21,358
Unfortunately, it didn't work. Is this how you suggested I try it?

View attachment 91346
Yes, exactly. What does "didn't work" mean? Did you get an error message?

Technically, the criteria should be: Is Not Null, instead of Not Is Null.
 

TML15

Member
Local time
Today, 16:31
Joined
Apr 15, 2021
Messages
41
Yes, exactly. What does "didn't work" mean? Did you get an error message?

Technically, the criteria should be: Is Not Null, instead of Not Is Null.

Okay, I changed it to Is Not Null. Sorry, "didn't work" meant that the word "None" still appears in the drop down list.

Thanks!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:31
Joined
Oct 29, 2018
Messages
21,358
Okay, I changed it to Is Not Null. Sorry, "didn't work" meant that the word "None" still appears in the drop down list.

Thanks!
Sounds like "None" may not be all it is. Just for fun, what do you get with using this in place of <>"None"?
Code:
Not Like "*none*"
 

TML15

Member
Local time
Today, 16:31
Joined
Apr 15, 2021
Messages
41
Well, interesting idea...but same result. The word None is still there in the list. Could I possibly filter it out using the Properties of the Combo Box?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:31
Joined
Oct 29, 2018
Messages
21,358
Could I possibly filter it out using the Properties of the Combo Box?
Of course, you can. But, it's very intriguing why any of the previous suggestions do not work. Are you able to share a copy of the db to show the problem? Maybe we can get to the bottom of it.
 

TML15

Member
Local time
Today, 16:31
Joined
Apr 15, 2021
Messages
41
I attached a much condensed version. Please examine the NB_Search form
 

Attachments

  • AddressSearch.zip
    63.3 KB · Views: 248

isladogs

MVP / VIP
Local time
Today, 20:31
Joined
Jan 14, 2017
Messages
18,186
Put both criteria on the same line in your query.
Is Not Null And <>"None"
NOTE I haven't looked at your database
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:31
Joined
May 7, 2009
Messages
19,169
you can "replace" StreetTypeSym column of the query (both in qryStreetTypeNB and qryStreetTypeFilteredNB) to an expression:

Field: streetType: Nz([StreetTypeSym], "None")
Total: Group By
Criteria: <> "None"
 
Last edited:

TML15

Member
Local time
Today, 16:31
Joined
Apr 15, 2021
Messages
41
you can "replace" StreetTypeSym column of the query (both in qryStreetTypeNB and qryStreetTypeFilteredNB) to an expression:

Field: streetType: Nz([StreetTypeSym], "None")
Total: Group By
Criteria: <> "None"


Brilliant! That works! Thanks again @arnelgp !!
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:31
Joined
May 7, 2009
Messages
19,169

Users who are viewing this thread

Top Bottom