Results 1 to 4 of 4
  1. #1
    timmygrover is offline Novice
    Windows Vista Access 2003
    Join Date
    Dec 2011
    Posts
    26

    Cause a RND function to reevaluate

    What property of a field in a form that generates a random number would need to be modified to cause the RND() to reevaluate every time you tabbed to a new field in the form? Or maybe it could be linked to a button or something? I'm just not sure what the language would be to trigger a reevaluation on a certain action.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Why do you need a random number? What are you really trying to accomplish?

    The form is bound to table or query? Is the RND() function in query or textbox ControlSource?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    timmygrover is offline Novice
    Windows Vista Access 2003
    Join Date
    Dec 2011
    Posts
    26
    Quote Originally Posted by June7 View Post
    Why do you need a random number? What are you really trying to accomplish?

    The form is bound to table or query? Is the RND() function in query or textbox ControlSource?
    This is in an unbound form, I've got text that is randomly generated though a series of iif statements that are dependent on random numbers that are generated through RND() functions. I want the user to be able to update the values of the RND() functions so that they can get multiple versions of the text.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    One way might be code in the GotFocus or LostFocus event of each control to refresh the form:

    Me.Refresh
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. VBA Function
    By antoncata in forum Programming
    Replies: 16
    Last Post: 02-11-2012, 07:50 PM
  2. IIF Function
    By Gus in forum Access
    Replies: 2
    Last Post: 09-14-2011, 01:53 PM
  3. Function Help
    By th3spankst3r in forum Programming
    Replies: 12
    Last Post: 03-22-2010, 12:41 PM
  4. Want function to get current function name
    By Davis DeBard in forum Programming
    Replies: 2
    Last Post: 08-13-2009, 05:02 AM
  5. Is there a function to do this....
    By Nowherefast in forum Access
    Replies: 2
    Last Post: 12-31-2008, 08:08 AM

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