Results 1 to 2 of 2
  1. #1
    d9pierce1 is offline Expert
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    754

    RND number assistance

    Hi all,


    I started playing with a Qry on RND number as have never really used one.

    Code:
    X: Int(RND()*200)+1
    So I made this simple Qry and ran it. Works like a charm with one exception.
    Is there a way to insure thats it has 3 numbers? When the random number
    falls below 100 i need it to be 078 or 033
    OR
    Is there a way to make it between lets say 100 and 300 so it will never have
    less than 3 numbers in it.

    Thanks
    Dave

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    try : format(Int(RND()*200)+1,"000")

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

Similar Threads

  1. Need assistance
    By Dave14867 in forum Access
    Replies: 2
    Last Post: 12-18-2018, 10:54 AM
  2. need some assistance
    By WillemTWC in forum Access
    Replies: 20
    Last Post: 03-14-2018, 12:10 AM
  3. VBA assistance
    By Kwbrown in forum Programming
    Replies: 3
    Last Post: 03-15-2014, 03:09 PM
  4. Qry Assistance Please
    By buck in forum Access
    Replies: 8
    Last Post: 12-31-2013, 08:52 AM
  5. Need Assistance with Forms
    By JDA2005 in forum Forms
    Replies: 5
    Last Post: 06-30-2009, 03:37 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