Solved

Filter in Access with "&"

Posted on 2013-11-11
14
451 Views
Last Modified: 2013-11-14
I have a client that has upgraded from MSAccess 2007 to 2013. In 2007, when a text filter is applied on a field that has data with a "&", it would return results. Now in 2013, if a "&" is used, it returns no records. Is there a work around for this?
0
Comment
Question by:dgravitt
  • 7
  • 4
  • 3
14 Comments
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 39639576
You may try enclosing with [ ] (square brackets), like 'a[&]t' as mentioned in here:

http://support.microsoft.com/kb/826763

HTH.
0
 
LVL 61

Expert Comment

by:mbizup
ID: 39639597
What is the syntax for the filter you are using?
0
 

Author Comment

by:dgravitt
ID: 39639608
It is on a form where you right click on field and select Text Filters, Begins with and type J & J.
This is a company name field and many of the companies have a & in them.
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:dgravitt
ID: 39639614
The brackets don't work. Thanks for the suggestion.
0
 
LVL 61

Expert Comment

by:mbizup
ID: 39639624
Try doubling up on the &:

J && J

(The & is a special character - the operator for concatenation.)
0
 

Author Comment

by:dgravitt
ID: 39639633
No, that doesn't work either.
0
 

Author Comment

by:dgravitt
ID: 39639636
Like I said earlier, it worked fine in Access 2007
0
 
LVL 61

Expert Comment

by:mbizup
ID: 39639655
I don't have Access 2013, so can't actually test this, but your original syntax works for me in 2010.

If doubling the &'s doesn't work, then double check your original data to verify that you are indeed entering it correctly... for example, check the exact spacing between letters and &s, and make sure that there is an exact match

ie: your data has a record with exactly J & J,  not just "J & J Enterprises" (which will not be flagged as a match.
0
 

Author Comment

by:dgravitt
ID: 39639657
Yes, the data matches.
0
 
LVL 9

Assisted Solution

by:Valliappan AN
Valliappan AN earned 250 total points
ID: 39641240
0
 

Author Comment

by:dgravitt
ID: 39641597
That returns an error "Enter a valid value"
0
 
LVL 61

Accepted Solution

by:
mbizup earned 250 total points
ID: 39641716
Take a closer look at the last post by Dirk Goldar at the link posted by valli_an.  

When I tested this earlier, I was testing directly against a table, using the same features.  To mimic what you are doing, I've set up a form and am using the same filtering features.

Apparently the problem with the ampersand is not a new issue.

- Use the "Equals to" filter, not the Contains filter (which will give you the error you mentioned)
- Surround your text in double quotes    "J & J"
- If you want to find the text anywhere in the field rather that an exact match, use double quotes and asterisks --- again, with the Equals To filter, not the Contains filter:   "*J & J*"

These methods work for me, 100%, in Access  2007, 2010 and 2013
0
 

Author Closing Comment

by:dgravitt
ID: 39645786
Thanks for all the help.
0
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 39647606
That was a good one from mbizup.

 Thanks dgravitt.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Outlook 2010 not responding when sending email. 4 43
Access 2016 7 34
Outlook 2012 VBA: Object missing 14 33
Where should Group Policies be windows server 2016? 4 31
Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question