Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Query Issue
Ken Wykoff 
       
7 months ago
I ran into a snag tonight that was overlooked in the creation of my Book Database. I ran a query tonight to locate all the books in the library written by a single author, and it came back empty. I went in to look at the table, and the Author is brought into the query; I noticed the last name has a comma after it. Can anyone give me an idea how to fix this in the Main Table with the AuthorFirstName and AuthorLastName?
Ken Wykoff OP  @Reply  
       
7 months ago

Ken Wykoff OP  @Reply  
       
7 months ago
As you can see, it is like that in several of the last names.
Stanley Mc Keown  @Reply  
     
7 months ago
Use And " Not Like " in the criteria.

If you want only the last names that have no comma but are the same as the ones with commas

Like [Forms]![MainTableForm]![EnterLastNameTextBox] & "*" And Not Like "*" & [Forms]![MainTableForm]![EnterLastNameTextBox] & ","

If you want all the books whether there's a comma or not then just use the Like function -- see Richards search form videos.
Raymond Spornhauer  @Reply  
          
7 months ago
Show us your query in design view.

-Raymond
Kevin Yip  @Reply  
     
7 months ago
Ken  If you want to remove all the commas in the column, you can use Find & Replace in table view.  Make sure you click on the first row of the column with the commas, and choose to make changes only in the current column.
Ken Wykoff OP  @Reply  
       
7 months ago
Thanks, Stanley, I will give that a try. Raymond, I will attach a screenshot of the Query next. I wasn't sure if it would be an append query that needed to be made or something else. Still not that great with complicated queries. Kevin, I tried that, but when I do it in the first row of the column, it never shows the comma; however, as you can see, they are clearly there. I just need to remember the next time I import anything from Excel to be sure to double-check things like that. Thanks, guys, and I just know there has to be a simpler way than going down each row and removing them one at a time.
Ken Wykoff OP  @Reply  
       
7 months ago

Ken Wykoff OP  @Reply  
       
7 months ago
Hey Guys, I just found the answer to get the results I needed. Thank God I backed up that database several times. The answer was...Update Query:
Criteria:         Right([YourFieldName],1) = ","
Update To:   Left([YourFieldName],Len([YourFieldName])-1)

Commas are all removed. Now I can continue to work on that Search Form
Stanley Mc Keown  @Reply  
     
7 months ago
Well done Ken -- was going to mention an update query but they can be dangerous things for data and some data from other sources is not allowed by corporate to be changed. Was going to ask if it was possible to change the data first. Looks like is was.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

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 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 4/30/2026 10:26:45 AM. PLT: 1s