Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > Finding Hashtags < Dynamic Filtering 2 | Locked Out >
Finding Hashtags
By Richard Rost   Richard Rost on LinkedIn Email Richard Rost   20 days ago

Fix Searching for Hashtags Using the Pound Sign (#)


 S  M  L  XL  FS  |  Slo  Reg  Fast  2x  |  Bookmark Join Now

In this Microsoft Access tutorial, we'll talk about why hashtags can be tricky to find in text searches, filters, and query criteria, and I'll show you how to properly search for hashtags in your database fields by using square brackets around special characters. We'll look at how to apply this technique using both text filters and query criteria, and discuss why Access handles these characters differently.

Melissa from Richmond, Virginia (a Platinum Member) asks: How can I pull up records in Access when the notes fields have #hashtags in them? I am working with data that comes in from social media, and a lot of the notes have hashtags mixed into the text. I figured it would be easy to search for them, but every time I try, I get nothing back. I know the tags are there because I can see them when I scroll through the records, but Access refuses to match them when I run a search. I am probably missing something simple, but I cannot figure out what it is. Can you show me the right way to find records by hashtag?

Members

There is no extended cut, but here is the file download:

Silver Members and up get access to view Extended Cut videos, when available. Gold Members can download the files from class plus get access to the Code Vault. If you're not a member, Join Today!

Special Characters

  • # ? * [ ]

Prerequisites

Recommended Courses

Learn More

FREE Access Beginner Level 1
FREE Access Quick Start in 30 Minutes
Access Level 2 for just $1

Free Templates

TechHelp Free Templates
Blank Template
Contact Management
Order Entry & Invoicing
More Access Templates

Resources

Diamond Sponsors - Information on our Sponsors
Mailing List - Get emails when new videos released
Consulting - Need help with your database
Tip Jar - Your tips are graciously accepted
Merch Store - Get your swag here!

Questions?

Please feel free to post your questions or comments below or post them in the Forums.

KeywordsMicrosoft Access Not Finding Hashtags In Text Fields - Fix Like Search With Pound Sign

TechHelp Access, hashtag search, text filter, query criteria, special characters, square brackets, wildcard characters, LIKE keyword, note fields, filter contains, VBA code, SQL, social media data, parameter queries, sample databases, code vault

 

 

 

Start a NEW Conversation
 
Only students may post on this page. Click here for more information on how you can set up an account. If you are a student, please Log On first. Non-students may only post in the Visitor Forum.
 
Subscribe
Subscribe to Finding Hashtags
Get notifications when this page is updated
 
Transcript Today we've got one for the beginners, but I bet a lot of you advanced users get tripped up on this one too. Today we're going to talk about why hashtags don't show up if you do a text search, a filter, or a query criteria in Microsoft Access.

Today's question comes from Melissa from Richmond, Virginia, one of my Platinum members.

Melissa says, How can I pull up records in Access when the note fields have hashtags in them? I'm working with data that comes in from social media and a lot of these notes have hashtags mixed into the text. I figured it would be easy to search for them, but every time I try, I get nothing back. I know the tags are there because I can see them when I scroll through the records, but Access refuses to match them up when I run a search. I'm probably missing something simple, but I cannot figure out what it is. Can you show me the right way to find records by hashtag?

Well, yes, absolutely. Melissa, this is something that trips up a lot of people. Even advanced developers forget this from time to time. There are some special characters that, if you're going to search for them, you have to put them inside square brackets. In fact, I talk about them in my previous video, my Wildcard Search video, where I teach how to use the LIKE keyword. Go watch this video, by the way.

And in fact, if you look, you'll see right here the LIKE keyword and special characters. These guys: the asterisk, the question mark, and the hashtag symbol, or the pound sign, or the octothorpe, or number sign, whatever you want to call it. Also, the square bracket characters themselves are special characters.

So let's see how this works in practice. Here's my TechHelp free template. This is a free database. You can grab a copy off my website if you want to.

Let's say in your notes fields, and this works with any text field, not necessarily just notes fields, but let's say Richard Rost is right here, a Star Trek nerd. And let's say down here, I don't know, he also loves Rush. We'll put that as a hashtag.

Let's go to somebody else, Captain James Kirk. We'll just throw another Star Trek in here. And let's go to somebody else. One more. Let's put in here, I don't know, Wesley Crusher, a Rush fan.

So now let's close this. Let's come back in. Let's see, I'm on a totally different record. Let's say I want to search for Star Trek in here using just a basic filter.

Right click, text filter, contains. If I put in here Star Trek with the hashtag, nothing shows up, because that hashtag is a special character.

So let's turn the filter off. Now, if you just search for Star Trek like that, it'll come up. For example, if you search for just Rush, if I do the same thing, right click, now let's just do contains Rush right here. You'll get all of the Rush that appears, but you can see there's five of them. So there are other ones that have Rush in them, like this one, that aren't necessarily a hashtag. So that doesn't really help us.

Let's turn that back off again. And even if you select it with the hashtag in there, right click, you'd think the Access team should fix this. If the user is picking this, it really should know that that's a special character. I think Access should know that automatically, but it doesn't.

So what you've got to do is right click, text filters, contains, and then in here go square bracket hashtag close square bracket, then Star Trek, like that. And there you go. There are the two that have Star Trek in them. It's just a matter of putting those special symbols inside of square brackets.

Same thing works with query criteria. You're going to create a query. You come in here, you bring in your customer stuff, you bring in the notes field. Where are your notes? If you put criteria down here, I'm going to zoom in so you can see it better, Shift+F2. I got it really big. Let's make that smaller. Here we go.

If you just put Star Trek in here, hit OK, now it puts it inside of quotes like that, so you're not going to get anything, because nothing is equal to exactly that. So we've got to use our LIKE keyword.

So come in here. We're going to say LIKE. Now, you can't just do this either. Watch what happens. If I do that and run it again, I get nothing. Why is that? Well, I'm missing the wildcard characters. This says it's got to be equal to exactly that. So you have to put your asterisks in here, like that.

All these characters are driving me crazy. So, wildcard characters on the ends, and then the hashtag inside of square brackets. I knew I'd get them right one of these times.

OK, hit OK. Run it. There you go. There are your two with the hashtags.

And for those of you who are a little more advanced, keep in mind this also applies to your VBA code and your SQL. Always use those little square brackets around it.

If you want to learn more about this kind of stuff, I cover this topic in my Access Beginner Level 5 class. We do a lot more with wildcards and LIKE parameter queries, top values, all this kind of cool stuff.

So that's going to do it for your TechHelp video for today. Hope you learned something. Live long and prosper, my friends. I'll see you next time.

If you enjoyed this video, hit that thumbs up button right now and give me a like. Also, be sure to subscribe to my channel, which is completely free. And make sure you click that bell icon and select ALL to receive notifications whenever I post a new video.

Do you need help with your Microsoft Access project? Whether you need a tutor, a consultant, or a developer to build something for you, check out my Access Developer Network. It's a directory I put together personally, of Access Experts who can help with your project. Visit my website to learn more.

Any links or other resources that I mention in the video can be found in the description text below the video. Just click on that Show More link right there. YouTube is pretty good about hiding that, but it's there. Just look for it.

Now, if you have not yet tried my free Access Level 1 course, check it out now. It covers all the basics of Microsoft Access, including building forms, queries, reports, tables, all that stuff. It's over four hours long. You can find it on my website or my YouTube channel. I'll include a link below you can click on. And did I mention it's completely free?

And if you like Level 1, Level 2 is just one dollar. That's it. And it's free for members of my YouTube channel at any level.

Speaking of memberships, if you're interested in joining my channel, you get all kinds of awesome perks. Silver members get access to all of my extended cut TechHelp videos, and there are hundreds of them by now. They also get one free beginner class each month. And yes, those are from my full courses.

Gold members get the previous perks plus access to download all of the sample databases that I build in my TechHelp videos. Plus, you get access to my Code Vault, where I keep tons of different functions and all kinds of source code that I use. And gold members get one free expert class every month after completing the beginner series.

Platinum members get all of the previous perks, plus they get all of my beginner courses, all of them from every subject. And you get one free advanced or developer class every month after finishing the expert series.

And you can become a Diamond Sponsor and have your name listed on the sponsor page on my website.

So that's it. Once again, my name is Richard Rost. Thank you for watching this video brought to you by AccessLearningZone.com. I hope you enjoyed it. I hope you learned something today. Live long and prosper my friends. I'll see you next time.
Quiz Q1. Why might hashtags in a text field not be found when performing a basic search or filter in Microsoft Access?
A. Hashtags are ignored by Access filters by default
B. Hashtags are treated as special wildcard characters in Access
C. Access only searches numbers and letters, not symbols like hashtags
D. Hashtags are case sensitive and need to be capitalized

Q2. What is the correct way to search for records containing a hashtag (e.g., #Star Trek) in Access?
A. Put a backslash before the hashtag (e.g., \\#Star Trek)
B. Put the hashtag inside parentheses (e.g., (#)Star Trek)
C. Put the hashtag inside square brackets (e.g., [#]Star Trek)
D. Remove all spaces from the search term (e.g., #StarTrek)

Q3. Why are certain characters such as the hashtag, asterisk, and question mark considered special in Access?
A. They are reserved for internal Access processing
B. They are used as wildcard or pattern-matching characters
C. They are ignored in all searches by default
D. They are only used in table names

Q4. What must be included in your query criteria to find text containing a hashtag in Access?
A. Only the word you are looking for with no symbols
B. The hashtag inside square brackets and the word, possibly with wildcard characters
C. Double quotation marks around the hashtag and the word
D. The hashtag and word without any special formatting

Q5. What does the LIKE keyword do in an Access query?
A. Compares numbers on a scale
B. Looks for exact matches only
C. Allows pattern-matching using wildcards
D. Filters only on numeric fields

Q6. What is the purpose of using asterisks (*) in the LIKE criteria for Access queries?
A. To limit the search to a specific number of records
B. They act as wildcards to represent one or more characters
C. To specify comments in the query
D. They are required only when using dates

Q7. If you want to search for the text #Rush in the notes field using a query, what should your criteria look like?
A. "Rush"
B. LIKE "*Rush*"
C. LIKE "*[#]Rush*"
D. LIKE "[#]Rush"

Q8. If you search for #Star Trek using the filter but do not get any results even though there are records with that hashtag, what is the most likely cause?
A. Access does not support filters
B. The filter is case sensitive
C. The hashtag needs to be placed inside square brackets
D. The records are hidden

Q9. Besides searches and filters, where else should the special character treatment for hashtags be remembered in Access?
A. Only in table design view
B. In VBA code and SQL statements
C. Only in Access reports
D. Only in exported files

Q10. Which of the following is NOT required to accurately find records containing hashtags in Microsoft Access text fields?
A. Square brackets around the hashtag symbol when searching
B. Using the LIKE keyword for partial or wildcard searches
C. Adding wildcard characters to match surrounding text
D. Removing all special characters from the text field

Answers: 1-B; 2-C; 3-B; 4-B; 5-C; 6-B; 7-C; 8-C; 9-B; 10-D

DISCLAIMER: Quiz questions are AI generated. If you find any that are wrong, don't make sense, or aren't related to the video topic at hand, then please post a comment and let me know. Thanks.
Summary Today's TechHelp tutorial from Access Learning Zone addresses a common stumbling block in Microsoft Access, even for experienced users. The focus today is on why hashtags do not appear when you search, filter, or apply query criteria to text fields that contain them.

I recently received a question from someone working with data imported from social media platforms. These imported fields often include hashtags embedded in long text entries. While it might seem straightforward to search for these hashtags, users find that their search attempts come up empty, even though they can see the hashtags when scrolling through their records. The issue is not with the data itself or your search skills. Instead, it has to do with how Access interprets certain special characters, such as the hashtag.

When searching for strings that include special characters like the hashtag symbol, Access requires a different approach. In fact, this challenge also applies to other special characters like the asterisk, question mark, and even the square brackets themselves. Each of these has special significance in Access's search and filter operations.

To solve this, if you want Access to find a hashtag within a text field, you must put the character inside square brackets. Let me illustrate this with a simple example using my TechHelp free template, which is available for anyone interested in following along.

Suppose you have a Notes field in your table, and one of the records contains "#Rush" to indicate a music preference. Another record might have "#StarTrek" for a Star Trek reference. Now, if you try to filter the Notes field by simply entering "#StarTrek," Access will not return any results. That is because the hashtag is treated as a special character and not as standard text for filtering purposes.

If you filter by only the word "Rush," you might get all instances of the word, whether or not it is a hashtag. This can be unhelpful if you are specifically looking for the hashtags.

The trick here is to enter your filter criteria with the hashtag inside square brackets. So, instead of searching for "#StarTrek," enter "[#]StarTrek" in the filter dialog. This instructs Access to look specifically for the hashtag character followed by your search term. This approach works not just in filters, but also when setting up query criteria.

When designing a query, simply specifying "#StarTrek" as the criteria will not return results, since the hashtag is special. You also cannot use just the LIKE keyword with "#StarTrek" alone, because the pattern matching will not behave as expected. Instead, you need to include wildcards on either side of your search phrase along with the bracketed hashtag, using a format like LIKE "*[#]StarTrek*". This will cause Access to match any note containing the hashtag directly before the search term.

If you are doing more advanced development using VBA or SQL, remember to use the same approach. Always enclose the hashtag in square brackets when trying to match it in text fields.

For those who want more information about working with wildcards and search criteria, I cover these topics in greater detail in my Access Beginner Level 5 course, which explores wildcards, parameter queries, top values, and more.

You can watch a complete video tutorial with step-by-step instructions on everything discussed here on my website at the link below.

Live long and prosper, my friends.
Topic List Why searching for hashtags in Access often fails
Why hashtags are considered special characters in Access
How to search for hashtags using filters in text fields
Using square brackets with special characters in Access searches
Conducting text filter searches with special characters
How to search for hashtags using query criteria in Access
Using the LIKE keyword with wildcards in Access queries
Placing special characters inside square brackets in query criteria
Applying wildcard characters with LIKE in Access queries
Ensuring correct search results by formatting query criteria properly
Searching for hashtags in both forms and queries in Access
Use of special character formatting in VBA and SQL in Access
Article If you have ever tried searching for a hashtag in a Microsoft Access text field, you might have noticed that your search does not return any results, even though you can clearly see the hashtags in your data. This is a common issue that affects both beginners and experienced Access users, especially as more data comes in from social media or other sources where hashtags are popular. Understanding why this happens and how to solve it will save you time and frustration.

In Access, certain characters are treated as special or wildcard characters when you are using search criteria, filters, or queries. The hashtag (also called the pound sign or number sign) is one of these special characters, along with the asterisk (*), question mark (?), and square brackets ([ ]). Because Access interprets these characters in a special way, searching for them directly can give you unexpected results or, more often, no results at all.

Suppose you have a notes field in your Access database containing text like #StarTrek or #Rush mixed into the middle of sentences. If you try to filter or search for #StarTrek by right-clicking the field, choosing Text Filters, and entering #StarTrek, Access will not return any records. This is because Access treats the hashtag as a wildcard for a single digit in its search patterns rather than as a literal character.

To search for a literal hashtag in Access, you must enclose it in square brackets. For example, to find "#StarTrek" anywhere in the notes, you need to specify [#]StarTrek in your search or query criteria. This tells Access to match an actual hashtag character instead of interpreting it as a wildcard.

Here's how this works in practice: If you want to filter your notes field in a datasheet view to show only entries with "#StarTrek", right-click on the notes field, select Text Filters, then Contains, and enter [#]StarTrek. Access will now correctly return the records that have hashtag "StarTrek" in them.

The same principle applies when building a query. Open the query designer and include your fields, such as customer information and the notes field. In the criteria row under notes, enter the following:

LIKE "*[#]StarTrek*"

This expression tells Access to look for anything that contains the string "#StarTrek" anywhere in the field. The asterisk (*) on both sides is a wildcard that matches any number of characters, and [#] tells Access to match an actual hashtag character.

If you forget the square brackets and just write LIKE "*#StarTrek*", the search will not work because "#" is being treated as a wildcard, not a literal hashtag.

This technique also extends to your SQL statements and VBA code. Any time you need to search for a special character in text—such as wildcards or hashtags—in Access, enclose it in square brackets. For example, in SQL you would write:

WHERE notes LIKE "*[#]Rush*"

This will find any notes that include "#Rush".

Other special characters that require the same treatment include the asterisk (*), question mark (?), and the square brackets themselves. For each one, use square brackets in your search pattern. For example, to search for a literal asterisk, use [*]; for a literal question mark, use [?]; and for a literal opening square bracket, use [[ ]].

Remember, if your text contains hashtags or other special symbols and you want to search or filter for records containing them, always use square brackets around the symbol in your criteria. This simple trick ensures that Access searches for the exact character you want, not a wildcard or placeholder.

With this knowledge, you should be able to reliably find records containing hashtags or other special characters in Microsoft Access using both filters and queries. This approach keeps your searches accurate, especially when dealing with social media data, log imports, or any other text fields that might contain special symbols.
 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2025 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 12/15/2025 12:10:11 PM. PLT: 1s
Keywords: TechHelp Access, hashtag search, text filter, query criteria, special characters, square brackets, wildcard characters, LIKE keyword, note fields, filter contains, VBA code, SQL, social media data, parameter queries, sample databases, code vault  PermaLink  Microsoft Access Not Finding Hashtags In Text Fields - Fix Like Search With Pound Sign