Results 1 to 3 of 3
  1. #1
    asmores is offline Novice
    Windows 2K Access 2003
    Join Date
    Mar 2013
    Posts
    20

    Standard number format?

    I have created an access database where a user can enter specific filter information and the database will spit out their specific criteria pulled from a static table. The problem my users are coming into is that some are using a general number format (5000) while others are using a standard format (5,000). My code does not seem to what to accept the commas in the standard format. Does anyone know how i can correct this?
    Thank you,

  2. #2
    asmores is offline Novice
    Windows 2K Access 2003
    Join Date
    Mar 2013
    Posts
    20
    Scratch that, formatting the text box to "General Number" fixes the issue.

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Glad you got it working, but for future reference, you can remove a specific invalid character, using the Replace Function:
    Code:
    Private Sub TargetField_AfterUpdate()
     Me.TargetField = Replace(Me.TargetField, ",", "")
    End Sub

    where the first argument

    Me.TargetField = Replace(Me.TargetField, ",", "")

    in this case a Comma, is the character to be replaced, and the second argument

    Me.TargetField = Replace(Me.TargetField, ",", "")

    in this case a Zero-Length String (basically nothing), is the character to replace it with.

    Linq ;0)>

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Number format issue
    By stafjoy in forum Queries
    Replies: 5
    Last Post: 07-19-2012, 08:38 AM
  2. Number Format to General Format
    By mkc80 in forum Access
    Replies: 2
    Last Post: 05-05-2012, 02:10 AM
  3. Standard format for Yes/No fields
    By coolpal9 in forum Forms
    Replies: 1
    Last Post: 01-20-2012, 04:56 AM
  4. Number Field Format.
    By cap.zadi in forum Reports
    Replies: 2
    Last Post: 12-04-2011, 10:17 PM
  5. Default number format?
    By joewilly1 in forum Queries
    Replies: 1
    Last Post: 11-24-2010, 09:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums