Results 1 to 2 of 2
  1. #1
    Knelou is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2013
    Posts
    45

    Giving a specific number to some data

    Hi everyone,

    I would like to know how I can give a specific number when I enter a certain data... Let's say I have my first column "Code" where I fill text, a column for the time in takes and a third column "Time expected". When I enter for example the code E in the first column, I want Access to fill "15" in "Time expected". But for some codes, I won't need to fill the column Time expected, it's only for 2 codes (E --> 15 and F --> 30).


    Let me show you what I would like to see in datasheet view :

    Code Time (mn) Time expected (mn)

    A 4
    B 7
    E 10 15
    F 30 30


    Thanks !

  2. #2
    Knelou is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2013
    Posts
    45
    Oops sorry I haven't tried the simplest, the Iif function of course...

    IIf([Code]="E",15,IIf([Code]="F",30,Null))

    Works now, problem solved ! Sorry for the inconvenience !

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

Similar Threads

  1. Count of specific number
    By samirmehta19 in forum Access
    Replies: 3
    Last Post: 05-20-2013, 02:29 PM
  2. How to get a specific number for the current month?
    By Ronald Mcdonald in forum Access
    Replies: 1
    Last Post: 06-14-2012, 11:55 AM
  3. Dividing time by a specific number
    By harrig04 in forum Queries
    Replies: 1
    Last Post: 07-05-2011, 09:09 AM
  4. Replies: 2
    Last Post: 05-17-2011, 02:40 PM
  5. Replies: 0
    Last Post: 01-03-2011, 03:38 PM

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