have 3 display as 03 in table from form

Posted on 2011-04-28
Last Modified: 2012-05-11
Hello I have this code:
StrCvsN = IIf([chk1] = -1 Or [chk2] = -1, 3, IIf([chk3] = -1 Or [chk4] = -1, 24, 0))

I cannot change to IIf([chk1] = -1 Or [chk2] = -1, 03,IIf
i am attaching database - the code is behind form- is there a way to display 3 as 03?
thank you
Question by:davetough
    LVL 119

    Accepted Solution


    or Format(3,"00")
    LVL 75

    Assisted Solution

    by:DatabaseMX (Joe Anderson - Access MVP)
    How about:
    StrCvsN = Format(IIf([chk1] = -1 Or [chk2] = -1, 3, IIf([chk3] = -1 Or [chk4] = -1, 24, 0)),"00)

    LVL 44

    Expert Comment

    The short answer is NO if you want the result to be cast as a number.  In the two previous answers, the result is cast as a string.
    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    I was going by 'display'
    display 3 as 03


    Author Closing Comment

    thanks- i should of said string- but that is what i need

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
    Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
    In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    779 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

    18 Experts available now in Live!

    Get 1:1 Help Now