Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    Indiana
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Negative $$$ data entry

    I have a rather complex Invoice Form where there is a field for "Warranty Costs". This amount is deducted from the total repair costs. The current method of entry requires the (-) to be placed before the warranty charge amount (ex. -$414.54). Is there a method for setting the default entry to always be a (-) negative, without having to type the (-) before amount. We have had some data entry errors because the data entry user forgot the (-).

  2. #2
    2 Star Lounger
    Join Date
    Dec 2000
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Negative $$$ data entry

    if you place this in the lostfocus event for the text box:

    If Not IsNull(Me![warrenty costs]) Then Me![warrenty costs] = -Abs(Me![warrenty costs])

    it should always return a negative number

  3. #3
    Star Lounger
    Join Date
    Apr 2002
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Negative $$$ data entry

    My preference would be to place code in the OnExit event for the WarrantyCosts. The code could be set to check if the amount is less than $0. If >$0 then pop up a message box indicating the amount should be less than zero, please try again and set the focus back to the WarrantyCost box. If there is EVER a chance that a WarrantyCost could be an amount > $0 (stranger things have happened) you could use a Yes/No MsgBox asking them to confirm the amount should be >$0 and have an If/Then statement to handle their response.

    Good luck.

  4. #4
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    London, Ontario, Canada
    Posts
    437
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Negative $$$ data entry

    Quick and easy method would be to set the Validation Rule Property for the field to <font color=red><=0</font color=red> and you could set the Validation Text property to something like <font color=red>Must Be a Negative Number</font color=red>

  5. #5
    Star Lounger
    Join Date
    Apr 2002
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Neat Option Brian

    I keep forgetting about some of the easier property settings.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •