Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    vbjohn is offline Novice
    Windows 2K Access 2003
    Join Date
    Aug 2011
    Posts
    10

    IsNull not working


    One of my fields is already pre-populated. And when you change any of the information on the textbox it gives an error:

    Input Mask: 99/99;00;0;_

    If IsNull(Me!txtRec_date) then
    msgbox "You Must enter in a date", , gstrApplicationName
    end if


    For example:
    it prepopulates the field as 02/21/2012
    and i just only change one of them as... 02/22/2012 then it pops up.

    Any ideas?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Where do you have your code?

  3. #3
    vbjohn is offline Novice
    Windows 2K Access 2003
    Join Date
    Aug 2011
    Posts
    10
    In the button clause. To make the change.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You have it under a Command Button in the OnClick event?

  5. #5
    vbjohn is offline Novice
    Windows 2K Access 2007
    Join Date
    Aug 2011
    Posts
    10
    In the Click event, yes.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try putting it in the AfterUpdate event of the YourDate control.

  7. #7
    vbjohn is offline Novice
    Windows 2K Access 2007
    Join Date
    Aug 2011
    Posts
    10
    It still brings up: "The value you entered isn't appropriate for the input mask '99/99;00;0;_' specified for this field.

    I put in a breakpoint on the first line and it does not hit it.

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Before you show the error, put in a MsgBox that displays the field so you can see it.

  9. #9
    vbjohn is offline Novice
    Windows 2K Access 2007
    Join Date
    Aug 2011
    Posts
    10
    It does not even hit that sub-routine when i click on it. The first line of the code I put a breakpoint in.

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You *must* make a change to the date to get an AfterUpdate event.

  11. #11
    vbjohn is offline Novice
    Windows 2K Access 2007
    Join Date
    Aug 2011
    Posts
    10
    and I have done that.

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You do not get a MsgBox with the contents of the field when you make a change to the control?

  13. #13
    vbjohn is offline Novice
    Windows 2K Access 2007
    Join Date
    Aug 2011
    Posts
    10
    That is correct. I get nothing coming up.

  14. #14
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Care to zip up your db and post it? Remove any sensitive data of course.

  15. #15
    vbjohn is offline Novice
    Windows 2K Access 2007
    Join Date
    Aug 2011
    Posts
    10
    It is a big file and with a lot of sensitive information on it. I will see what I can do.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. IsNull
    By JJCHCK in forum Programming
    Replies: 3
    Last Post: 09-09-2011, 07:57 AM
  2. dcount and isnull
    By Madmax in forum Access
    Replies: 7
    Last Post: 06-22-2011, 09:31 AM
  3. IsNull not working...
    By Moekandu in forum Programming
    Replies: 3
    Last Post: 01-29-2011, 06:48 PM
  4. Query using IIf(IsNull) expression
    By jmartin in forum Queries
    Replies: 3
    Last Post: 12-18-2009, 04:19 PM
  5. IsNull question
    By Simon Sweet in forum Access
    Replies: 4
    Last Post: 12-22-2007, 04:33 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