Results 1 to 4 of 4
  1. #1
    ZMac is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2010
    Location
    Minnesota, USA
    Posts
    8

    Data Entry Problem

    I have a table set up with an AMOUNT field (Double - Standard - Decimal Place 2).



    By mistake, I entered 36,33 instead of 36.22. Access updated the field as 3,633.00.

    Is there a way to format the table field so that this entry error won't be accepted?

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Quote Originally Posted by ZMac View Post
    I have a table set up with an AMOUNT field (Double - Standard - Decimal Place 2).

    By mistake, I entered 36,33 instead of 36.22. Access updated the field as 3,633.00.

    Is there a way to format the table field so that this entry error won't be accepted?
    There are ways to validate but the one thing that you have to be careful of, is depending on how you do this, or what values you select, it can possibly not let someone enter a valid value.

    So, perhaps you might want just a warning message box to come up if a value over a certain amount is entered. That can be in that control's Before Update event:

    Code:
     
    Private Sub ControlNameHere_BeforeUpdate(Cancel As Integer)
    If Me.ControlNameHere > 1000 Then ' I used 1000 but you can determine the amount
       If MsgBox("You entered an amount over $1,000. Is that correct?", vbQuestion + vbYesNo, "Warning") = vbNo Then
          Cancel = True
          Me.ControlNameHere.Undo
       End If
    End If
    End Sub

  3. #3
    ZMac is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2010
    Location
    Minnesota, USA
    Posts
    8
    Bob,
    Appreciate the information and your taking the time to respond. The amounts entered are quite varied so I don't think this method will work in the application I am having problem with, but it may very well be useful in other applications. Thank again!
    ZMac

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    About the only thing I see you can check on is whether a comma has been typed.
    If InStr(Me.ControlNameHere, ",") > 0 Then
    If MsgBox("You entered a comma in this value. Should it be a period?", vbQuestion + vbYesNo, "Warning") = vbYes Then
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Data entry
    By tarhim47 in forum Forms
    Replies: 2
    Last Post: 05-26-2011, 12:09 PM
  2. Opening Form in Data Entry Mode Problem
    By alsoto in forum Forms
    Replies: 1
    Last Post: 05-28-2009, 07:45 PM
  3. Form Data Entry Problem?
    By corystemp in forum Database Design
    Replies: 1
    Last Post: 03-21-2009, 02:29 PM
  4. Report Detail Entry Selection Problem
    By Joe in forum Reports
    Replies: 0
    Last Post: 02-02-2009, 06:55 PM
  5. Data Entry And Data Recalling
    By GeeDee in forum Access
    Replies: 0
    Last Post: 05-01-2007, 05:20 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