Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003

    Unanswered: Format / Validation / Input Mask

    I am trying to create a text box that stores a negative dollar amount without having to manually key the minus sign.

    I have tried input masks, formats, and validations, but cannot get the value to store as negative, without manually entering it as such.

    I am using Access 2000 for my front end and SQL Server 2000 as the backend. The datatype is smallmoney.

    Any help is appreciated.

  2. #2
    Join Date
    Nov 2002
    A debit or credit can be either positive or negative...such that you can have a negative'll have to worry about a sign, I' afraid...

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Jun 2003
    Provided Answers: 1
    If you are using Access, see if this will work:

    Add you textbox control to the form, but make it invisible.
    Add another (visible) textbox to the form and set its value to the value of your field time -1. Enter you data in this field.

    If you field's don't update automatically, you may need to put an AfterUpdate event on your unbound control that sets the value of the hidden field.

    If setting the value of the unbound field to the negative of the bound field doesn't work, you could also put an OnCurrent event in your form that sets the value of the unbound field.

    You'll need to work out the details, but you see the idea is to hide the actual field and switch the sign with code when the value is updated.


Posting Permissions

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