Results 1 to 4 of 4
  1. #1
    MFS is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235

    MsgBox to inform me that a txt box in less than zero on my form


    Hello,
    Still learning but progressing . . . .
    Needing help with some VB to have a MsgBox appear when a numeric value in a textbox is less than zero. Where the user must adjust the value to a positive number before allowing the user to advance to the next textbox.
    How easily could this be done?
    Could someone help me with the VB?

    Thank You,

    Speck

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Is this to validate user input? Could set the textbox ValidationRule and ValidationText properties - no VBA needed.

    Or is user editing records that already have negative values in this field?
    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
    MFS is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235
    No, the user is entering data, And I want to ensure that numbers entered are always greater than 0.
    I will try what you have suggested.

  4. #4
    MFS is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235
    That will work perfectly, Thank You June7

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

Similar Threads

  1. Replies: 3
    Last Post: 08-23-2015, 12:11 PM
  2. Replies: 5
    Last Post: 02-13-2015, 07:24 PM
  3. Replies: 2
    Last Post: 04-03-2014, 11:44 AM
  4. Replies: 5
    Last Post: 06-14-2013, 11:44 AM
  5. If no matches Reopen form after Msgbox
    By LoveLearning in forum Access
    Replies: 2
    Last Post: 07-18-2012, 06:08 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