Results 1 to 4 of 4
  1. #1
    jsabina is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2012
    Posts
    2

    compile a field on checkbox selection

    Hi,


    I have a field that I would like to display as checkbox:
    expenses - incomings

    I have another field "Total amount" where I will put a number as currency.

    I would like that if I press the checkbox "expenses" on the field "total amount" will be added the "-" sign.

    Is that possible?
    Do you have any suggestions?

    thanks

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Sure; at its simplest:

    Me.TextboxName = Me.TextboxName * -1

    You may want to use the Abs() function in case the user already made it negative.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    jsabina is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2012
    Posts
    2
    and I put that code in the afterUpdate event of the group checkbox?

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Well, in the VBA editor for that event:

    http://www.baldyweb.com/FirstVBA.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 10
    Last Post: 11-21-2011, 02:56 AM
  2. Replies: 1
    Last Post: 11-03-2011, 11:56 PM
  3. Replies: 3
    Last Post: 10-31-2011, 04:54 PM
  4. Replies: 4
    Last Post: 02-08-2011, 08:43 AM
  5. Replies: 7
    Last Post: 03-03-2010, 11:06 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