Results 1 to 3 of 3
  1. #1
    RiverAnimal is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Dec 2010
    Posts
    2

    Custom Data input mask or format?

    Hi, i got little problem on custom field im working on. It is only for a game (Fallen earth), but i like little details...



    It is a field for the price of things using Gold, Red, blue, and gray coins..

    What i would like to do is enter data like 52510 and having field change display for 5R 25B 10G and 0G for zero.

    Here is what i came with so far. First using the input mask
    !##0\R #0\B #0\G;0;_

    But it is anoying to have to skip the first fields to enter small numbers like 50.
    So ive change it for
    !###\R ##\B ##\G;0;_

    That is faster to enter data but i dont like the way it displays. : R B 50b. Ive tryed to find ways to default values, or condition so it would display 0R 0B 50G or even better just 50G, but all attemps failed. So i came with a different approch, using the format field instead, and tryed
    ##0\R #0B #0G, access dont like it, looks like and modify it to
    0"R "00"B "00\G

    That is still my best result so far, but still trying to improve it so it would display for zero chip "0G" instead of "0R 00B 00G"

    Thanks in advance for your advises

    Im trying to find a way to put some conditions for the display of results, and the way i enter data. For example, if i type 102 when i hit that field, i would like the display result to be 1B 02G.

  2. #2
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    You could create another field to just display the results as you want them displayed. That way you're not changing the actual value and can change how it's displayed (I'm assuming this on a form.) The other field's controlsource could be an expression such as =Format(Forms!MyFormName!MyOtherField,"##0\G")

  3. #3
    RiverAnimal is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Dec 2010
    Posts
    2
    Thank you that works, i was hopping to be able to fix it directly into the data base, but that will do the job also.

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

Similar Threads

  1. Input mask messed up my field data type
    By ghostmachine in forum Access
    Replies: 2
    Last Post: 11-11-2010, 05:32 PM
  2. Replies: 4
    Last Post: 10-31-2010, 10:35 AM
  3. custom mask
    By RedGoneWILD in forum Reports
    Replies: 2
    Last Post: 08-04-2010, 03:23 PM
  4. day of week input mask
    By jacko311 in forum Programming
    Replies: 7
    Last Post: 11-15-2009, 12:56 PM
  5. Input mask
    By doobybug in forum Access
    Replies: 2
    Last Post: 06-17-2009, 09:40 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