Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


have 3 display as 03 in table from form

Posted on 2011-04-28
Medium Priority
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 120

Accepted Solution

Rey Obrero (Capricorn1) earned 1200 total points
ID: 35486323

or Format(3,"00")
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 800 total points
ID: 35486328
How about:
StrCvsN = Format(IIf([chk1] = -1 Or [chk2] = -1, 3, IIf([chk3] = -1 Or [chk4] = -1, 24, 0)),"00)

LVL 44

Expert Comment

ID: 35486534
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
ID: 35486577
I was going by 'display'
display 3 as 03


Author Closing Comment

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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
A Case Study of using the Windows API to provide RS232 communications capability in Access without the use of Active-X controls.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
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…
Suggested Courses

564 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