how canc i hange a positive number to negative in vba access 2010

Posted on 2011-05-10
Last Modified: 2012-05-11

how canc i hange a positive number to negative in vba access 2010  and a negative number to a positive
Question by:bill201
    LVL 11

    Expert Comment

    I would say simply multiply by -1

    However, you sometimes get a decimal place introduced in the calculation, so be aware of that.

    If dblValue>0 Then dblValue = -1*dblValue
    LVL 11

    Accepted Solution

    what I meant to say was that you sometimes get a decimal introduced when you multiply an Integer by -1!!!

    Seems to be an ongoing bug in VB

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
    Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
    Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
    With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now