Solved

Access - Remove percent sign

Posted on 2010-09-14
6
662 Views
Last Modified: 2012-05-10
It is possible to remove a percent sign from a field in a table and just leave the number?  Lets say the table is Account and the field is cost, is there some VBA to just remove "%"

Any help is appreciated
0
Comment
Question by:JohnMac328
  • 3
  • 2
6 Comments
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 33673811
JohnMac328,Is the data type for the column text, or is it numeric with percent formatting?Patrick
0
 

Author Comment

by:JohnMac328
ID: 33673836
It is a text field
0
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 500 total points
ID: 33673880
As an update:UPDATE [Tablename] SET [columnname] = Replace([columnname], "%", "")As a select:SELECT [columnname], Replace([columnname], "%", "") AS NoPercSignFROM [Tablename]
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 92

Assisted Solution

by:Patrick Matthews
Patrick Matthews earned 500 total points
ID: 33673893
So, in VBA, for example:DoCmd.RunSQL "UPDATE [Tablename] SET [columnname] = Replace([columnname], '%', '')"
0
 

Expert Comment

by:Saichand
ID: 33673964
Please check the attached file.
0
 

Author Closing Comment

by:JohnMac328
ID: 33673968
Great thanks, they all work fine
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now